WIP: merge imageutils into astropy core

This is a WIP, but is the PR to merge ``imageutils`` into the Astropy core package. I have attempted to preserve the history but removed code that simply affected affiliated package infrastructure code.

This is not ready for review or merging, and still needs updates to the docs, tests to pass, etc.

cc @larrybradley @cdeil @adonath @eteq @hamogu