Minor class rearrangement.

* Moved `core.AbstractGroup` to `util`.
* Moved `core.FunctionalGroups` to `lib`.