options: re-work the option handling logic

There is a bug in the gcc 4.6 version of std::function that causes
copied lambda objects to reference the wrong object capture
location. This works in gcc 4.7.

This change re-works the option_t object to specify a bound data
value that gets modified depending on the argument type in a
declarative way.