Run js retcode assert

Add support to function run_js() in jsrun.py to assert against a given process return code. This uncovers issues in other.test_embind which were not caught before. See #2335.