Rewrite mode parser and mode management

No longer have a long chain of duplicate modes for list arguments.
Instead, use a hash table and a unionized mode structure with type
classification.