Use compile-time static mapping tables in the CAP parser
Besides replacing the existing dynamic maps, this also replaces three switch cascades that triggered warnings about uninitialized variables.
Add a very basic unit test to ensure things still work.