Merge "Add functions to query #threads and looper state."
am: e926572996

Change-Id: I83167a960dfcf196c5c27bff2e16f41a7493f3bf