The StorageEngine pointer is currently held and owned by ServiceContext's subclasses, ServiceContextMongoD and ServiceContextEmbedded. These subclasses are superfluous, and should be eliminated. The first step is to move ownership of the StorageEngine object into the ServiceContext class.
Eventually, the StorageEngine should probably be a decoration, as it does not exist in mongos, but that's less urgent.