Initial commit

Porting all the code from Qiita and extending the tests.
I think this is actually a slightly misleading error message.  In Qiita, I just tried this (forgot the "qiita." schema prefix in my query):
```python
with conn.get_postgres_cursor() as cur:
    cur.execute("select * from analysis_chain")
    print cur.fetchall()
```
and I got this error:
```
qiita_db.exceptions.QiitaDBConnectionError: Cannot get postgres cursor! relation "analysis_chain" does not exist
```