Add a thread filter to the ring buffer

Summary: Typically you just want to know what was happening recently on
the thread that crashed, so add a thread parameter. 0 means all threads.

Reviewed By: @swtaarrs

Differential Revision: D1634720
emitFuncGuard should use prepareForSmash

Summary: We don't want to recreate the alignment logic
in lots of places, and we need to tag the guard so that
future relocations know its alignment requirements

Reviewed By: @swtaarrs

Differential Revision: D1634806