Remove obsolete workaround for #11040, derive PartialEq

mozilla/rust#11040 is fixed, so the workaround can be removed.

Deriving Eq now requires deriving PartialEq as well.
Squelch warnings

Update .to_owned() to .to_string()

Turn off the non_snake_case_functions lint.
Deduplicated code, making State<T> generic