The `get_current_context()` and `get_entered_or_microtask_context()`
methods now return `Option<Local<Context>>` to reflect that an isolate
may not have entered any context.
They're also moved from `Isolate` to `struct Entered` because it turns
out that the underlying V8 API calls actually create new local handles,
hence they should only be used inside an active HandleScope.
The `InContext` trait has been removed.
A test exercising `ContextScope` and the `get_*_context()` methods
mentioned above was added.
Closes: #248.
This patch clarifies that v8::Isolate is a single threaded creature,
which can only be accessed from other threads in special circumstances.
To ensure optimal operation in Deno, we remove v8::Locker, which ought
to be unnecessary when a thread is dedicated to each Isolate and the
Isolates never move between threads.
There are valid use-cases for v8::Locker, and we hope to address them in
future versions of rusty_v8.
Co-authored-by: Bert Belder <bertbelder@gmail.com>