Makes <<__Memoize>> work with static methods

Summary: Next will be top level methods. The tests feel a little thin here, but I think the main memoization tests cover most of what needs to be tested so I just added tests to show that it works with a static method. Let me know what you think I'm missing

Reviewed By: @jano

Differential Revision: D1502068
Fix a crash when using sqliteCreateFunction

Summary: The segfault is reproduced by the test.
Without this fix, drupal 7 when configured to use sqlite is unusable.
The crash occurs for instance when clearing the cache.
Closes https://github.com/facebook/hhvm/pull/3512

Reviewed By: @ptarjan

Differential Revision: D1503431
check EAGAIN & EINTR in read

Summary: Closes https://github.com/facebook/hhvm/pull/3509

Reviewed By: @ptarjan

Differential Revision: D1503423
Don't apc_inc/dec on non-numerics

Summary: Closes https://github.com/facebook/hhvm/pull/3419

Reviewed By: @ptarjan

Differential Revision: D1488804
Fix json_encode UTF8 error

Summary: Removed the hack to not return false on utf8 errors
That hack was introduced due to getting utf8 errors on unexpected situations

Seems to be working now, so remove the hack.

Changed one test in slow to properly match php
Closes #3457

Reviewed By: @ptarjan

Differential Revision: D1497833

Pulled By: @fredemmott
Vasm review comments

Summary: A few cleanups, and remove the now unused align{} instruction.

Reviewed By: @alexmalyshev

Differential Revision: D1503963
Rework hphp/test/zend/.gitattributes

Summary: - if any of these are touched, you need to edit both good/ and bad/ (-bad +good hopefully)
- might as well sort them

Reviewed By: @ptarjan

Differential Revision: D1497848