lib: bump soname

Adding return values to notmuch_database_close and
notmuch_database_destroy may require bumping the soname.
python: handle return status of database close and destroy

Throw an exception if notmuch_database_close or notmuch_database_destroy
fail.
go: add return status to database close method

Add return status to the Database.Close() method that calls
notmuch_database_destroy.
ruby: handle return status of database close

Throw an exception if notmuch_database_destroy fails.
cli: refactor insert

Change insert_message into write_message and move its responsibilities
for indexing the message into the main function, to simplify the control
flow.