Introduce DEFINE_DOCUMENT_TYPE_CASTS, and use it

As a step to use DEFINE_TYPE_CASTS, this cl introduce DEFINE_DOCUMENT_TYPE_CASTS.
It's used by HTMLDocument, ImageDocument, PluginDocument, and SVGDocument in order to replace
manual toFoo() with generated toFoo() which supports all cast functions.

BUG=309516

Review URL: https://codereview.chromium.org/107073003

git-svn-id: svn://svn.chromium.org/blink/trunk@163404 bbb929c8-8fbe-4397-9dbb-9b2b20218538