Use nested transaction to update remote schema

Otherwise it commit/rollback in the end of the transaction will close
the transaction initiated by pkgdb_repo_init()
Be consistent about stdout/stderr in pkg.

If a user requires `pkg help` explicitly then we output help strings
to stdout. Otherwise, we use stderr assuming that a user doesn't know
what to do with pkg.

Closes:	#695
Submitted by:	jmmv
Fix rotten repo-*.sqlite when ^C is hit