Add support for read-only transactions

Moved from GitHub pydgraph/30

Posted by danielmai: