Flush out the db api documenation

This commit updates the existing documentation and adds missing
documentation to the db api for subunit2sql.

Change-Id: Iea078f6a3dc6e173278d4ebdce383dfb264dab6f