Some minor fixes and improvements to sum types.
Added unit testing module for sum_type.
Renamed 'select' 'constructor'.

The previous name was causing conflicts in some cases when compiling
with g++.