fixed bug in accessing null pointer

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7236 b45a01b8-16f6-495d-af2f-9b41ad6348cc
fixed double call to sqlite3_close()

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7237 b45a01b8-16f6-495d-af2f-9b41ad6348cc
fixed initialisation of random ids

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7238 b45a01b8-16f6-495d-af2f-9b41ad6348cc