If the page is using LiquidThreads, add a new thread

We also need to modify RequestContext::getMain() since
we used to just modify our own ApiMain's instance. However
LQT also calls internally without passing it through, so
by modifying the main context, we can ensure that
all future API calls use that context.

Bug: 52729
Change-Id: I9ee63a924e1afdd9f6c66d58168d2fed9e3dd586