Add PNG image density metadata support

https://bugzilla.gnome.org/show_bug.cgi?id=466372
Move density unit convesion macros into a common header. Fix conversion from dpcm to dpi