Rework frame management, and backref/lastline along with it.

These changes should bring us more in line with the way other
implementations manage "frame" data and bindings that capture it.
It should also reduce the cost of framing, binding captures,
blocks and procs, and operations that manipulate blocks and procs
like define_method and instance_eval.

The new logic works as follows:

* Rather than a binding immediately duplicating a frame, it
  instead grabs a reference to it and marks it as captured.
* When popping a frame, if it has been marked captured it is
  discarded rather than being cleared. This moves the cost of
  creating a binding to the pop of the surrounding method, which
  reduces the cost of nested bindings re-cloning the frame many
  times.
* Bindings that are still active (have captured a frame that has
  not been popped) will update the method's frame data in-place.
* Once the frame has been popped, it will live only in that
  binding.

This commit passes mspec ci and test:mri19, but I am continuing
to test it for a while.

Note that this commit also moves backref and lastline to
the frame. They have always been frame-local, but for a long time
we kept them on the scope so we could avoid touching the frame for
methods that did not need it. However, because we used the scope,
it was difficult or impossible to isolate backref and lastline
changes to the block. Moving to the frame, which has a lifespan
only as long as the method that activated it, makes isolation
easier.

This should also make it easier to fix thread-safety issues with
backref/lastline, as reported in JRUBY-7167.
Force heap scope when named captures are present.

Named captures currently require that there be a heap scope
available, since that's how the match logic updates the local
variables that go with the capture names. Because backref no
longer requires a scope on its own, the method did not properly
use heap-based local variables in the presence of a named capture,
and as a result did not see the updated values.

My fix adds logic to ASTInspector that forces a heap scope when
there is a Match2CaptureNode present, indicating named captures.

Note: There's nothing about named captures that *must* have a
heap scope. We could update them in the calling code after the
call returns, one by one. This would be slower than updating them
as a group, as in the current logic, but it would not force us to
allocate the extra scope and force all local variables to the
heap.
Fix BigDecimal#/

When dividing BigDecimal by a Float, the Float is converted to
Rational “for higher precision,” and then divides the numerator
by the denominator.  However, when doing that division, `div19`
was being used which does a `floor` on the returned float.  This
commit replaces the call to `div19` with `op_div`.
This commit also addresses issues with return type of the result,
which changes from version to version in Ruby.
See https://github.com/rubyspec/rubyspec/pull/220 for tests.

Use java.math.BigDecimal to compute rational and float value.

Make test applicable for 1.9/2.0 only.

Code cleanup.

A bit of housekeeping, adding whitespaces after commas, and around
equals.

Return Float when BigDecimal is divided by Float in 1.9.

Recent versions of 1.9.3 now exhibit the same behaviour as 2.0.
Merge pull request #797 from tychobrailleur/bigdecimal_div2

Fix for BigDecimal#/
isBindingFrame no longer used.
LoadService.lockAndRequire() was renamed to LoadService.require() in 8072fc0

Fixes #808
Merge remote-tracking branch 'github/master'
Convert to Markdown
Fix README.md
get_backtrace_data call sequence changed.

Fixes #641.
RubyGems 2.x now requires the path to *.gem for Gem::Package.new
Choose the latest version to install
*.gem file discovery is Rake task's responsibility.
Remove unused frame-related fields and methods.
Need to unwrap exception before checking for security exception
Avoid using $~ as an out parameter in Regexp search/match logic.

This fixes issues where threads would step on each others results
by updating $~ between the time the match was created deeper in
the stack and retrieved higher up. The result was that the match
logic would return another thread's MatchData.

My fix is to never read $~ in these methods and only ever write
it; this does not help the issue (across all impls) where $~ is
shared and not reliable across threads, but it should fix issues
where it was being used internally to pass MatchData to calls
higher in the stack.

Fixes JRUBY-7167 and JRUBY-7176.
Merge branch 'new_framing'
Fix enum arg handling in Nexter

The Nexter for Enumerators needs to have its enum args packed in the
same way as each_with_index.  Refactor the arg handling in EachWithIndex
to cover this case too.
Omit send and __send__ from backtraces (1.9+).
Improved logging and enum use in ASTInspector.