Changes to format type(s) and mode type

_FormatType, _SubtypeType and _EndianType are now combined into _Format.
_ModeType was renamed to _Mode.

Code for string input is now inside these classes.

Format constants are now directly assigned in the module namespace, which
should make clearer where they come from.

The dictionaries _formats, _subtypes and _endians are not necessary anymore.

Many assertions were replaced by exceptions.
Add function format_check()
Return dict instead of list of tuples in available_*()
write(): more informative error message

... and change assertion to exception.
Remove exclamation marks from error messages