added recursion protection during autoload

I've tested various cases and compared to zend, they all work fine after the fix (added tests in tests/slow/autoload). 

This is the first time I write code in hhvm, so please let me know if there's anything to fix in terms of style, infrastructure usage or anything else.