codegraph: add some unit test infrastructure for the PHP analysis

Summary:
Jiao recently added some features in graph_code_php.ml to recognize
xhp attributes and link their uses to their def. There was
no easy way to write unit tests other than "run codegraph
in pfff/tests/php/codegraph/ and looks if it looks correct". This
diff makes the code in graph_code_php.ml more testable and
add some basic test infrastructure.

Test Plan: make test

Reviewers: jiaol, pieter, mathieubaudet

Reviewed By: pieter

CC: platform-diffs@lists

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