Remove dependency on foldl library

The library has a fair few dependencies of its own, so keeping compatibility
with it but avoiding dependency keeps hurtle lightweight in itself.
Simplify TypedStore API