Factor out new Rest class

To wrap GET and POST in Hash <=> JSON conversion
Factor out #url method; tests and docs