Preparatory commits for "universal door"

These changes are needed to support the universal door.
Reviewers: @josh-ripple @mtrippled 
I think having auto return types in function definitions is bad if the type of the return value itself is not obvious. Is it a std::pair<int, message_category()} ? Maybe a std::tuple<> ? Unclear at a glance.