Add semigroup and monoid instances

As mentioned in #23