[backpatch] Fixes on get/set/current-schema (9.3 branch)

As requested (see comment thread #207) and to complete what have been initiated in PR #215, here's a backpatch of recent fixes on the subject against 9.3 branch.

Following pulls were backpatched
- PR #207
- PR #216
- PR #229