Merged code from path-15

Since the new method `toBase64()` requires to fetch file metadata i merged the code of my other [pull request](https://github.com/itbra/joomla-cms/blob/patch-15/libraries/joomla/image/helper.php) regarding this file to fetch the required information using class functionality - namely `getImageFileProperties()`.