Implement monoid concept for maybe data type.

Include basic unit tests too. Documentation taken from original
implementation before maybe was an alias of sum_type.