add test for /api json stats
style consistency in write-stream.js
hacky disabling of rest tests in rpc mode