This will reduce the bundle size by ~23%(117kb).
Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.
`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.
`lodash` is still used in the tests which is fine because it makes the
tests cleaner.
Closes#2118