configure.ac (AC_INIT) : Set version to 0.4.0
configure.ac (ESIDL_VERSION) : Set to 0.4.0 as well
[Object] Switch over to shared_ptr based implementation

We're going to manage interface objects by using std::shared_ptr and replacing
the internal reference counting method. This change is the first big one for
doing this. We will check and fix circular references, etc., by smaller changes
later.

1) Base classes

With this change, implementation objects that are derived from the Imp class
are managed by std::shared_ptr.

org/w3c/dom/ObjectArray.h
src/Any.cpp
src/Any.h
src/Any.test.cpp
src/Object.h
src/ObjectArrayImp.h

(Imp) : Every interface implementation class is now derived from this class
(Object) : The new Object class is basically a wrapper for std::shared_ptr<Imp>
(Any, ObjectArray, ObjectArrayImp) : Revised to support the new Object class

2) DOM, Window and Media

Refine details to support the new Object class.

src/BackgroundTask.cpp
src/MediaListImp.cpp
src/MediaListImp.h
src/NodeImp.cpp
src/NodeImp.h
src/WindowImp.cpp
src/WindowImp.h
src/WindowProxy.cpp
src/WindowProxy.h
src/html/HTMLIFrameElementImp.cpp
src/html/HTMLIFrameElementImp.h
src/html/MediaQueryListImp.cpp
src/html/MediaQueryListImp.h

3) JS and V8

Refine details to support the new Object class. Now that we cannot directly
manipulate the reference count of each interface object, an extra object, an
shared_ptr, is created for each corresponding ECMAScript object for keeping
them alive.

src/ECMAScript.h
src/js/Script.cpp
src/js/Script.h
src/js/bridge.cpp
src/js/esjsapi.h
src/v8/ScriptV8.cpp
src/v8/ScriptV8.h
src/v8/bridgeV8.cpp
src/v8/esv8api.h

4) CSS

Now CSSParser does not directly touch raw pointers of interface implementation
classes.

src/css/CSSGrammar.yy
src/css/CSSParser.cpp
src/css/CSSParser.h

CSS property values are accessed via the CSSStyleDeclarationImp class using a
double dispatch like method, and thus we use the raw CSSStyleDeclarationImp
pointer rather than CSSStyleDeclarationPtr. This is intentional and the
corresponding parameters are named 'self'.

src/css/CSSPropertyValueImp.cpp
src/css/CSSPropertyValueImp.h

CSSStyleDeclarationImp::pseudoElements[0] does no longer contain a pointer to
itself as it will end up a circular reference. Otherwise, changes are trivial.

src/css/CSSStyleDeclarationImp.cpp
src/css/CSSStyleDeclarationImp.h

The box classes are still manged by using the internal reference counting,
but not using the former Object methods this time. We will modify these using
std::shared_ptr later, too.

src/css/Box.cpp
src/css/Box.h
src/css/BoxGL.cpp

5) cloneNode operations and copy constructors

Since self(), i.e., shared_from_this(), cannot be used inside the constructors,
every cloneNode operation is revised. The changes are very straightforward.

src/CharacterDataImp.h
src/ElementImp.cpp
src/ElementImp.h
src/TextImp.cpp
src/TextImp.h
src/html/HTMLAnchorElementImp.cpp
src/html/HTMLAnchorElementImp.h
src/html/HTMLAppletElementImp.h
src/html/HTMLAreaElementImp.cpp
src/html/HTMLAreaElementImp.h
src/html/HTMLAudioElementImp.h
src/html/HTMLBRElementImp.cpp
src/html/HTMLBRElementImp.h
src/html/HTMLBaseElementImp.cpp
src/html/HTMLBaseElementImp.h
src/html/HTMLBindingElementImp.cpp
src/html/HTMLBindingElementImp.h
src/html/HTMLBodyElementImp.cpp
src/html/HTMLBodyElementImp.h
src/html/HTMLButtonElementImp.h
src/html/HTMLCanvasElementImp.cpp
src/html/HTMLCanvasElementImp.h
src/html/HTMLCommandElementImp.cpp
src/html/HTMLCommandElementImp.h
src/html/HTMLDListElementImp.h
src/html/HTMLDataListElementImp.cpp
src/html/HTMLDataListElementImp.h
src/html/HTMLDetailsElementImp.h
src/html/HTMLDivElementImp.cpp
src/html/HTMLDivElementImp.h
src/html/HTMLElementImp.cpp
src/html/HTMLElementImp.h
src/html/HTMLEmbedElementImp.h
src/html/HTMLFieldSetElementImp.cpp
src/html/HTMLFieldSetElementImp.h
src/html/HTMLFontElementImp.h
src/html/HTMLFormElementImp.cpp
src/html/HTMLFormElementImp.h
src/html/HTMLFrameElementImp.cpp
src/html/HTMLHRElementImp.h
src/html/HTMLHeadElementImp.cpp
src/html/HTMLHeadElementImp.h
src/html/HTMLHeadingElementImp.h
src/html/HTMLHtmlElementImp.cpp
src/html/HTMLHtmlElementImp.h
src/html/HTMLImageElementImp.cpp
src/html/HTMLImageElementImp.h
src/html/HTMLInputElementImp.cpp
src/html/HTMLInputElementImp.h
src/html/HTMLKeygenElementImp.cpp
src/html/HTMLKeygenElementImp.h
src/html/HTMLLIElementImp.h
src/html/HTMLLabelElementImp.cpp
src/html/HTMLLabelElementImp.h
src/html/HTMLLegendElementImp.cpp
src/html/HTMLLegendElementImp.h
src/html/HTMLLinkElementImp.cpp
src/html/HTMLLinkElementImp.h
src/html/HTMLMapElementImp.cpp
src/html/HTMLMapElementImp.h
src/html/HTMLMarqueeElementImp.cpp
src/html/HTMLMarqueeElementImp.h
src/html/HTMLMediaElementImp.cpp
src/html/HTMLMediaElementImp.h
src/html/HTMLMenuElementImp.h
src/html/HTMLMetaElementImp.cpp
src/html/HTMLMetaElementImp.h
src/html/HTMLMeterElementImp.cpp
src/html/HTMLMeterElementImp.h
src/html/HTMLModElementImp.h
src/html/HTMLOListElementImp.cpp
src/html/HTMLOListElementImp.h
src/html/HTMLObjectElementImp.cpp
src/html/HTMLObjectElementImp.h
src/html/HTMLOptGroupElementImp.h
src/html/HTMLOptionElementImp.cpp
src/html/HTMLOptionElementImp.h
src/html/HTMLOutputElementImp.cpp
src/html/HTMLOutputElementImp.h
src/html/HTMLParagraphElementImp.h
src/html/HTMLParamElementImp.h
src/html/HTMLPreElementImp.h
src/html/HTMLProgressElementImp.cpp
src/html/HTMLProgressElementImp.h
src/html/HTMLQuoteElementImp.h
src/html/HTMLReplacedElementImp.h
src/html/HTMLScriptElementImp.cpp
src/html/HTMLScriptElementImp.h
src/html/HTMLSelectElementImp.cpp
src/html/HTMLSelectElementImp.h
src/html/HTMLSourceElementImp.h
src/html/HTMLSpanElementImp.cpp
src/html/HTMLSpanElementImp.h
src/html/HTMLStyleElementImp.cpp
src/html/HTMLStyleElementImp.h
src/html/HTMLTableCaptionElementImp.h
src/html/HTMLTableCellElementImp.cpp
src/html/HTMLTableCellElementImp.h
src/html/HTMLTableColElementImp.h
src/html/HTMLTableDataCellElementImp.h
src/html/HTMLTableElementImp.cpp
src/html/HTMLTableElementImp.h
src/html/HTMLTableHeaderCellElementImp.h
src/html/HTMLTableRowElementImp.cpp
src/html/HTMLTableRowElementImp.h
src/html/HTMLTableSectionElementImp.cpp
src/html/HTMLTableSectionElementImp.h
src/html/HTMLTemplateElementImp.cpp
src/html/HTMLTemplateElementImp.h
src/html/HTMLTextAreaElementImp.cpp
src/html/HTMLTextAreaElementImp.h
src/html/HTMLTimeElementImp.h
src/html/HTMLTitleElementImp.cpp
src/html/HTMLTitleElementImp.h
src/html/HTMLTrackElementImp.cpp
src/html/HTMLUListElementImp.h
src/html/HTMLUnknownElementImp.cpp
src/html/HTMLUnknownElementImp.h
src/html/HTMLVideoElementImp.h

6) Trivial changes

Trivial changes such as:
  Add typedefs for shread_ptr<T>
  Prefer nullptr to 0 where appropriate
  Use std::make_shared instead of new
  Use std::dynamic_pointer_cast instead of dynamic_cast
and so on.

src/AttrImp.h
src/Box.test.cpp
src/CaretPositionImp.cpp
src/CharacterDataImp.cpp
src/ClientRectListImp.cpp
src/CSSStyle.test.cpp
src/DocumentFragmentImp.cpp
src/DocumentImp.cpp
src/DocumentImp.h
src/DocumentTypeImp.cpp
src/DocumentTypeImp.h
src/DOMImplementationImp.cpp
src/DOMImplementationImp.h
src/DOMParserImp.cpp
src/DOMTokenListImp.h
src/DragEventImp.cpp
src/DragEventInitImp.cpp
src/Escudo.cpp
src/EventImp.cpp
src/EventImp.h
src/EventListenerImp.h
src/EventSourceImp.cpp
src/EventTargetImp.cpp
src/EventTargetImp.h
src/FocusEventImp.cpp
src/HistoryImp.cpp
src/HistoryImp.h
src/HTMLParser.test.cpp
src/KeyboardEventInitImp.cpp
src/LocationImp.cpp
src/LocationImp.h
src/MessageEventImp.cpp
src/MessageEventInitImp.cpp
src/MouseEventImp.h
src/MouseEventInitImp.cpp
src/MutationEventImp.h
src/MutationRecordImp.cpp
src/Navigator.test.cpp
src/NodeIteratorImp.cpp
src/NodeListImp.h
src/ProcessingInstructionImp.cpp
src/RangeImp.cpp
src/Script.test.cpp
src/StyleSheetImp.cpp
src/Test.glut.cpp
src/Test.util.cpp
src/TrackEventImp.cpp
src/TrackEventInitImp.cpp
src/TreeWalkerImp.cpp
src/UIEventImp.h
src/UIEventInitImp.cpp
src/WheelEventInitImp.cpp
src/css/CSSCharsetRuleImp.cpp
src/css/CSSFontFaceRuleImp.cpp
src/css/CSSImportRuleImp.cpp
src/css/CSSImportRuleImp.h
src/css/CSSMediaRuleImp.cpp
src/css/CSSMediaRuleImp.h
src/css/CSSNamespaceRuleImp.cpp
src/css/CSSPageRuleImp.cpp
src/css/CSSPrimitiveValueImp.cpp
src/css/CSSRuleImp.cpp
src/css/CSSRuleImp.h
src/css/CSSRuleListImp.cpp
src/css/CSSRuleListImp.h
src/css/CSSSelector.cpp
src/css/CSSSelector.h
src/css/CSSStyleRuleImp.cpp
src/css/CSSStyleRuleImp.h
src/css/CSSStyleSheetImp.cpp
src/css/CSSStyleSheetImp.h
src/css/CSSUnknownRuleImp.cpp
src/css/CSSValueListImp.cpp
src/css/CounterImp.h
src/css/DocumentCSSImp.cpp
src/css/FormattingContext.cpp
src/css/FormattingContext.h
src/css/LineBox.cpp
src/css/RGBColorImp.cpp
src/css/RectImp.cpp
src/css/Replaced.cpp
src/css/StackingContext.cpp
src/css/StackingContext.h
src/css/Table.cpp
src/css/Table.h
src/css/TableGL.cpp
src/css/ViewCSSImp.cpp
src/css/ViewCSSImp.h
src/css/ViewCSSImpGL.cpp
src/file/BlobImp.cpp
src/file/FileListImp.cpp
src/file/FileReaderImp.cpp
src/file/FileReaderSyncImp.cpp
src/html/ApplicationCacheImp.cpp
src/html/AudioTrackListImp.cpp
src/html/CanvasRenderingContext2DImp.cpp
src/html/DataTransferImp.cpp
src/html/DataTransferItemImp.cpp
src/html/DataTransferItemListImp.cpp
src/html/HitRegionOptionsImp.cpp
src/html/HTMLAllCollectionImp.cpp
src/html/HTMLCollectionImp.cpp
src/html/HTMLCollectionImp.h
src/html/HTMLFormControlImp.cpp
src/html/HTMLFormControlImp.h
src/html/HTMLFormControlsCollectionImp.cpp
src/html/HTMLFormControlsCollectionImp.h
src/html/HTMLOptionsCollectionImp.cpp
src/html/HTMLParser.cpp
src/html/HTMLParser.h
src/html/HTMLPropertiesCollectionImp.cpp
src/html/HTMLTokenizer.cpp
src/html/HTMLTokenizer.h
src/html/ImageDataImp.cpp
src/html/MediaControllerImp.cpp
src/html/MessageChannelImp.cpp
src/html/MessagePortImp.cpp
src/html/RadioNodeListImp.cpp
src/html/ScreenImp.h
src/html/TextTrackCueImp.cpp
src/html/TextTrackCueListImp.cpp
src/html/TextTrackImp.cpp
src/html/TextTrackListImp.cpp
src/html/VideoTrackListImp.cpp
src/http/HTTPRequest.h
src/svg/SVGMatrixImp.cpp
src/typedarray/ArrayBufferImp.cpp
src/typedarray/ArrayBufferViewImp.cpp
src/typedarray/DataViewImp.cpp
src/typedarray/Float32ArrayImp.cpp
src/typedarray/Float64ArrayImp.cpp
src/typedarray/Int16ArrayImp.cpp
src/typedarray/Int32ArrayImp.cpp
src/typedarray/Int8ArrayImp.cpp
src/typedarray/Uint16ArrayImp.cpp
src/typedarray/Uint32ArrayImp.cpp
src/typedarray/Uint8ArrayImp.cpp
src/typedarray/Uint8ClampedArrayImp.cpp
src/xhr/XMLHttpRequestEventTargetImp.cpp
src/xhr/XMLHttpRequestImp.cpp
src/xbl/XBLContentElementImp.cpp
src/xbl/XBLImplementationListImp.cpp