Merge pull request #8 from NicolasT/master

Enhance thread-awareness
ready for 0.8.1
META
or -> ||
Rework `dbopen` modes

Whilst previously the `mode` argument passed to `_dbopen` was a plain
`int`, without the predefined flag values being exposed, this change
reworks this into using a list of a flag type.