[declarative] Support fetching history based only on contact id
Allows for showing backlog in the chat view even without being online
Reviewed-by: Alexander Akulich <akulichalexander@gmail.com>