Fixed errors and changed from static to const.

 * `static` has been changed to `const`. Rust has been updated, and
`const` is the new `static`.
 * `ShiftState` and `ToggleState` have been renamed to
`ModifierKeyState` and `LockKeyState`.
 * Documentation in the bitflags macros has been removed and changed to
commentary. Documentaton in macros currently makes the compiler fail.
See https://github.com/rust-lang/rust/issues/18076