Introduce DEFINE_IMAGE_TYPE_CASTS, and use it

As a step to use DEFINE_TYPE_CASTS, this cl introduce DEFINE_IMAGE_TYPE_CASTS.
BitmapImage, SVGImage can use it to generate toFoo() type case helper functions.

BUG=309516

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

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