Allow session resumption only when enabled

... and apply a minor cosmetic change.

THIS COMMIT IS MEANT TO BE SQUASHED INTO A PREVIOUS ONE WHEN THE HISTORY
OF THIS FEATURE BRANCH IS REWRITTEN.