Rename Init() to Open() as we need this method to return bool to
indicate its success in order to avoid using non-initialized handle
later. Init() is also reserved, by convention, for the common part of
all class ctors in wx code.
Remove m_initialized entirely, it doesn't seem to be obviously better to
cache the failure to create a session than to retry doing it every time
(in fact, it would seem to be worse) and not having it is simpler.
This commit is best viewed ignoring white space.
Don't force the application code to deal with wxObjectDataPtr<> or,
worse, calling {Inc,Dec}Ref() manually by hiding it inside the wx
objects themselves and giving the value-like semantics to them.
There should be no real changes in the behaviour, but the API does
change significantly. Notably, wxWebRequest is not a wxEvtHandler itself
any longer, as this would be incompatible with the value semantics, and
an event handler needs to be specified when creating it, so that it
could be notified about the request state changes.
Having wxWebSessionFactory part of the public API implies keeping
compatibility with the possible ways of implementing it which is too
restrictive for no good reason, so move this class to the private header
and don't document it nor wxWebSession::RegisterFactory() (which is now
private).