Remove duplicate tests.

Summary: Found all these by running a dedup script.

For every fileN.php deleted in this commit, the duplicate file is at file(N-1).php.

Reviewed By: @elgenie

Differential Revision: D1596717
Make solve_todos a utility function.

Summary: Makes it easier to add other types of 'todos'.

Reviewed By: @elgenie

Differential Revision: D1596894
Fix small memory leaks in ext_bcmath.cpp

Summary: Use SCOPE_EXIT to properly release resources, even when the function raises a warning or returns prematurely.

Reviewed By: @jdelong

Differential Revision: D1597156
Forgot to use emitLdLowPtr for Class::m_invoke

Reviewed By: @bertmaher, @markw65

Differential Revision: D1597419
Add 1s by default between starting $php_engine and running sanity check

Summary: php-ng starts up faster - and nginx hasn't finished starting up, so the sanity check fails.

Reviewed By: @oyamauchi

Differential Revision: D1597189