Database multi-tenancy for Rack (and Rails) applications