CRM-12926 : convert the flash to image and upload the image

The charts display on print screen was failing as the process of converting 'flash to image' was failing and the src of img url on print screen was false as no image was created for that src path.

The 'flash to image' convertion issue : 
This was working fine until the OpenFlashChart package was updated and some more updates for security reasons were done, in this update 'packages/OpenFlashChart/php-ofc-library/ofc_upload_image.php' file was removed.

The fix : reused some of the code from 'ofc_upload_image.php' and improved it and made it more tighter restricting it to '.png' files and mentioning the image creation directory path inside this image uploading code.