Cleanup weakrefs before handling finalizers

If weakrefs are kept alive because of finalizers, this means that people
can access finalized objects if they use finalizers. This shouldn't
happen and can cause problems, for example with therubyracer.

This problem occured with therubyracer which resulted in an exception
with the message "Data object has already been freed" because it
expects the object to be usable if it can be referenced through a
weakref.
Fix Regexp.set_last_match JIT primitive
Add support for JIT'ing primitive fallback code

We setup specializations for code with a primitive just like regular
methods, but don't replace the executor. We use the special
primitive_failed executor to check whether we have jitted versions and
run them. If we would replace the default executor, we would end up with
infinite recursion.
Use atomic increments for counters
Make debugging of global serial bumping easier

This gives us an option to see where the global serial is increased, to
find for example cases where this causes constant lookup caches to
invalidate.
Create global constants for common encodings

The lookup for these constants is a small improvement, but it was
showing up in profiles as spending significant time in the lookuptable
for these constants.
Fixed error introduced in 4bfc088e4c.
Add metadata for global cache entries
Setup proper type info for Numeric and Integer
Create smarter kind_of checks

If we can reuse the cached constant since it's referred static in the
code, we can create a quick check for the cases that the kind_of type
check succeeds and finds the correct type.

To optimize for VM types, it makes the assumption that inherited classes
from VM types will always use the VM type layout. The only way to hack
around this at the moment is manually changing a class for an object
with Rubinius::Unsafe.set_class. Since that explicitly is an unsafe
operation, this optimization doesn't break normal usage.
Move type checks up front for common cases

These cases are hit often in Rails apps (FFI due to Socket).
Added Erb, Erubis, Haml benchmarks
Added simple rack benchmark
Added simple Sinatra benchmark