fix inefficient queries from system page activity tab

There are two changes here:

* use system_activity.id in the ORDER BY clause, instead of
  activity.created or activity.id (this allows MySQL to avoid a temp
  table and filesort)

* pass a SQLAlchemy query through to the activity grid, so that TG
  @paginate can do its thing (this avoids fetching the entire activity
  result set, instead the query will have a suitable LIMIT applied)

Bug: 1097094
Change-Id: I6732044f3cb4b440a23190eed717d2fc65c043b8
Include remote_post for manually provisioned systems as well

(The original patch introduced this in 1479a07)

Bug: 1099231
Merge branch 'release-0.17' into develop