Former New Hampshire lawmaker loses right to vote after moving out of his district