Improve performance of tenant info update.

use bulk sql operations to speed up the tenant info update, as it's
taking  ~40s/1000 tenants to update on a decent machine.