[qtcontacts-sqlite] Improve support for relationships and batching

This commit improves the error handling and API conformance of the
backend in various areas including relationships and batch save/remove
functionality.