Multi tenancy

Resubmitting. Better commit messages, Changelog entry, windows actually builds (thanks @kacfengine!) etc minor fixes.