Move mutex onto OutletFactory

It's bad form for the mutex to live in the global namespace when it
doesn't need to.