Add mapMaybe and mapMaybeWithKey (issue #59)

They share the implementation with filter and filterWithKey, without affecting their structure reuse.

This fixes issue #59.