minor refactoring of @mode handling
minor refactoring of @mode handling

Doing this to ease the merging of the codedb-ffi-io branch
later on. While fixing some code in rubysl-socket it was noted
that it touched the @mode variable directly. To simplify
compatibility (forward and backward) with that gem, it makes
sense to move this @mode handling to its own methods.

jsyeo/rubinius,kachick/rubinius,kachick/rubinius,kachick/rubinius,jsyeo/rubinius,kachick/rubinius,kachick/rubinius,kachick/rubinius,jsyeo/rubinius,jsyeo/rubinius,jsyeo/rubinius,jsyeo/rubinius,jsyeo/rubinius,kachick/rubinius,kachick/rubinius