prserv: Ensure data is committed

In exclusive mode, we need to complete the transaction for writes to make
it to the database. Therefore add sync calls to ensure this happens.

Autocommit mode is significantly (100 times) slower so caching the
data is of significant benefit.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>