Revert "Revert a commit series that leads to a tricky merge until Jan can take a look."
Preserved old implementation of IndexASTConsumer (renamed to IndexRecordASTConsumer).
This code is soon (TM) to be impacted by the index-while-building feature upstreaming anyway.
TODO (as part of i-w-b upstreaming):
- remove IndexRecordASTConsumer
- remove IndexRecordActionBase
- consider taking advantage of ShouldSkipFunctionBody for index serialization
This reverts commit 96b6383be3e03fea6d7d498931163b49bf824ce3.