let pgrest can be configured by a configure file.

- added a configuration template 'config.ls.tpl'
- move all configuable options to `get_opts` function.
- added a `ensured_opts` funciton which is in charge to verify options.
reorded imported function statments.