Wales will become the first part of the UK to bring in automatic voter registration when pilots get underway next month.