perl/api: Port usercloak time and assigner changes from hostserv