Use STL-like conditional structure to judge option type.

* It's too ugly to use integral_constant to indicate option type.
* It's not necessary to define option types one by one.
Refactor socket option's implementations.