replace macro constants with enum types for user facing constants

Mentioned this to Pieter in IRC, and here is the patch.  Results in clearer compiler errors/warnings, and interfaces better with debuggers and analysis tools.  From a functionality perspective there should be no impact (and I got no test failures).