Refactored environment functions, added test suite
Bug fix: VM environment should not be destroyed when assignment fails
Added r_compile_from_cstr, updated test_compile test suite