Assisted dying services could be available on the Welsh NHS in future after politicians vote to back legislation.