Moved the handling of shard maps into another file.
Compile schemarouter as C++ so that refactoring into more coherent parts is easier.