SOC-3720 [Upgrade] Several problems of Activity Streams after "Load More"

Fix description:
* Change the way to get the number of activities on stream.
* Fix the bug of offset values when showing more activities.
* Fix the bug when creating activity reference during lazy upgrade.
Merge commit '9918c2264048a8a91540dd3fb9c44e032b72a8a5' into HEAD