Task/mongodb device registry

Add the possibility of using a MongoDB device repository instead of the previous in memory one.