Fix thread safety issue with modifying constant scope for code

Modifying compiled code objects at runtime results in race conditions if
the code is executed under different contexts in multiple threads.

This changes it to always use the constant scope from the call frame and
set this up properly for all the cases. Also the JIT needs to setup
these frames properly.

Also ensures that the JIT also checks the constant scope when validating
an inlined constant.

Fixes #2221
Add a nicer inspect for BlockEnvironment
Remove usage of MachineCode::parent

This was trying to keep some form of relationships between machine code
objects that was used only for JIT deopts. The problem is that is
absolutely not thread safe and can cause issues with deoptimizations.

This new approach uses the meta information already available in the JIT
to emil the call frame for the actual creator of the scope, so we can
use that. That is thread safe and doesn't have the issues of using
MachineCode::parent.

Fixes #2383
Fix invalid memory read

This would read free'd data, since the request is already deallocated
here when the request is finished in sync mode.
Better CPU detection

This copies the current CPU detection from LLVM trunk. There is an issue
with certain i7 CPU's where AVX is not available. One example of this is
the Linode vm's. There LLVM doesn't detect AVX is not available and
enables it.

This leads to SIGILL errors because it generates instructions the CPU
can't handle. This new detection properly handles this case since it has
additional logic for AVX and solves the issue.