Put some const-ness into the ArgumentParser.

This gets rid of some warnings.
Fix remaining compile warnings.