[codequery] support for mode of the hack file, hh/2

Test Plan: unit tests included

Reviewers: bill, keito, eletuchy

Reviewed By: eletuchy

Differential Revision: https://phabricator.fb.com/D1550887