Add unittest for User DB API

Fix bugs in db/api/user
Change-Id: Ie74705ac15cde67bf0063b33ec535f50e2892e1d
Merge "Add unittest for User DB API" into dev/experimental