Modified APC to deal with HHVM bug

The APCIterator in HHVM does not always return every result, so we work around this by creating a loop that generates new iterators until all of the items are cleared.