Compact local variable slots

After eliminating unreachable code, there may be unused local varaible
slots. Such gaps increase the method's frame size unnecessarily.

This was originally implemented by Miguel in
  https://github.com/lrytz/scala/commit/09c40359338f8770e4f99d045999af062112973e