Fix some problems found while exercising the gremlin-console.

1. A better test for whether toJSONSync() can be called on the result.
(FYI there were cases that caused the other method to crash).

2. Add 'T' (gremlin.Tokens) to context to support T.eq, T.lt, etc.

3. Fix ElementWrapper.toJSON().
The prior implementation appeared to be a stub. It didn't use a callback
function which caused problems. The new unit test 'v(id) with single id then toJSON'
failed with the prior implementation, but succeeds with the new implementation,
which is modeled directly after PipelineWrapper.toJSON.