Add upcast/cast_as to DynamicCapability. Also changed EventLoop.

wait_remote -> wait