Improve definition of `gatherBy`.

- Don't need `complement` helper function. Just compose `not` and
  `pred`.

- Handle case where `x` does not satisfy `pred`.