Add `Promise::Base#did_initialize` hook.
Stop exceptions thrown while resolving or rejecting from raising a state error.
Always raise with an exception class, since Rubinius throws a tantrum otherwise.
Refactor thread synchronisation to be more robust.