Remove use of strencode() outside Database classes

Change-Id: Idbc38d8089541e5154b2601297b429f7433fd59e
Merge "Remove use of strencode() outside Database classes"