Restructure adapters.

I've created abstract Adapter and Collection based on mongo adapter which has been splitted into two files.