CodeParser: New class to parse codes.

This is basically ProcessCodeList() and ReadCodes() split out from
dllmain.cpp.

Use the "do { } while (0)" idiom in macros to make them act like
regular functions.

Use const iterators and pass the lists by const ref.

TODO:
- Convert to a regular class and store the codes as a class variable.
- Use standard C stdio instead of istream.