desc: r.js inside reduce crashes server (#545)
tests:

  - cd: r.db('test').table_create('545')
    def: tbl = r.db('test').table('545')

  - cd: tbl.insert([{'id':0}, {'id':1}, {'id':2}])

  - js: tbl.reduce(r.js("(function(x,y){return 1;})"))
    py: tbl.reduce(r.js("(function(x,y){return 1;})"))
    rb: tbl.reduce(r.js("(function(x,y){return 1;})"))
    ot: 1

  - js: tbl.reduce(r.js("(function(x,y){return {id:x[\"id\"] + y[\"id\"]};})"))
    py: tbl.reduce(r.js("(function(x,y){return {id:x[\"id\"] + y[\"id\"]};})"))
    rb: tbl.reduce(r.js("(function(x,y){return {id:x[\"id\"] + y[\"id\"]};})"))
    ot: ({'id':3})

  - cd: r.db('test').table_drop('545')
