Ruleset Minimization in Multi-tenant Smart Buildings