SERVER-9468 Pull out bulk of CmdGetLastError::run() into helper
SERVER-8598 allow CollectionManager to track pending chunks

Also includes fixes for MetadataLoader
SERVER-8598 link pending to ShardingState and RangeDeleter