Rewrite getParamInfo() to actually handle caching and continuation

It claimed to handle caching; it lied (the complicated ifs always
degraded to one case – the one with no caching – for all parameters it
is ever called with).

It didn't handle continuations, resulting in bug 63545.

Bug: 63545
Change-Id: Ide6eec9c489ac6006b36a5218df81863ffe83eb4
Merge "Rewrite getParamInfo() to actually handle caching and continuation"