first cut cli generalization
global middleware
use pgrest.cli to run.

- move ensured_opts and get_opts to src/cli.ls
- let pgrest.cli recived parsed opts not just pgrest meta as first argument.
rename get_opts to get-opts.

- also rename ensured_opts to ensured-opts.
add pgparam in middleware.
add cli testcases.
let ensured-opts to check prefix, port, host.
add new field 'cookiename' in config.ls.tpl.
add meta filed in config.ls.tpl.
js -> ls

cmd.js should be generated by lsc.
npm tries to chmod to cmd.js before we create it. so we will get
this error message.

    npm ERR! Error: ENOENT, chmod
    '/path-to/api.ly/node_modules/pgrest/bin/cmd.js'

since we already chmod manually (by scripts@package.json), we don't
need this instruction actually. workaround it!
Merge pull request #19 from walkingice/master

js -> ls
Merge branch 'master' into feature/auth

Conflicts:
	bin/cmd.ls
	config.ls.tpl