Extend AddOnAssignedUsersFinder to allow retrieval of historical assigned users data.

Summary

After #490932 (comment 2143226228) is done we can extend the finder to retrieve historical data for given time period instead of always retrieving current data.

Proposal

  1. Extend the finder to retrieve historical data for assigned users when "from" and\or "to" params are passed.
  2. Update usages of extended finder so AiUserMetrics and AiMetrics endpoints consider historical data when timerange filters are used.
  3. Make sure that the finder raises an error if "from\to" is passed but no ClickHouse is available.
  4. If no "from\to" is passed we can rely on current state of the system and use PG only.
Edited by Pavel Shutsin