Collecting APC stats unconditionally, particularly size in order to allow better visibility over APC on production machines and generla APC open source API

Summary: Retrieving any APC info is not possible today on server that run into memory issues. This is the inital diff to make that information more transparent

Reviewed By: @markw65

Differential Revision: D1378696
Print how many ir opcodes are in a unit at high trace levels

Reviewed By: @jdelong

Differential Revision: D1380277
More cleanup in func.h

Summary: Continuation of the previous cleanup diff.  In it, we:

- Finish reorganizing Func and outsourcing definitions to func-inl.h.

- Eliminate methods which use only public interfaces and which are only
  called in one source file, and make them into local helper routines.

- Delete the m_id field from SharedData.  This appears to be the Id of
  the FuncEmitter which created the Func, which is just the index of the
  FuncEmitter in the Unit's stack of emitters.  It's not as obvious
  whether this serves a purpose for FuncEmitter, but it certainly
  doesn't for Func.

- Document more things.

Next steps are:

- Separate out FuncEmitter and FuncRepoProxy.
- Do some cleanup on Class, and maybe Unit.
- Isolate the Class and Func creation logic into a separate module.

Reviewed By: @alexmalyshev

Differential Revision: D1381031
allow context-sensitive usage of enum helper functions

Summary: The Enum functions in www currently use get_called_class() to
 get a string, then that string to look up the class. Instead, make a
 null classname look up the Class* from the ActRec.

Reviewed By: @jdelong

Differential Revision: D1370812
OS X port of Hack

Summary: There are two things that needed to be ported: inotify and libelf. I
would separate them into different diffs, but that would be tricky to test
since both are needed to build.

==FSEvents port of inotify==
The best API I could find for FSEvents works by adding a watch for a file path,
running a run loop, and then executing a callback when something has changed.
Since the run loop is blocking, I spawn a pthread to run the loop. The main
thread and the run loop thread communicate using a couple pipes and some
lockless linked lists.

Why pipes? Well, there is an API to schedule a callback with the runloop when a
FD is ready to be read. Furthermore, the ocaml code needs to be able to select
some other sockets at the same time it is waiting for fsevents.

Why linked lists? Serializing and deserializing the data in the pipes would be
a pain, and this works fine.

==getsectbyname port of the libelf stuff==
For the most part this is straightforward. The one really annoying thing is
that the apple API, `getsectbyname()`, is a little naive in returning memory
addresses. OS X seems to have ASLR on by default, so the addresses returned
cause segfaults (though of course it works in `lldb` since by default debuggers
tend to disable ASLR). My workaround was to sneak a `-no_pie` argument through
to the linker.

Reviewed By: @jwatzman

Differential Revision: D1378021
Make sure bump_pce->extra is nonnull

Summary: https://github.com/facebook/hhvm/issues/2925

Fixes #2925
Closes #2927

Reviewed By: @ptarjan

Differential Revision: D1380876

Pulled By: @JoelMarcey