Dump local variables information as "LOCV" section.

* Uses `lv_len` instead of `nlocals` to get count of local variables information.
  * `lv_len` is calculated from `lv` argument of `scope_new`.
* Implement `Kernel.local_variables` to test it's dumped correctly.