Venezuela has voted to select a new constitutional assembly, which would give President Nicolas Maduro's government virtually unlimited powers.