added ocr_state flag for future cronjob/background processing, moved im_preset array to scan.php, added im processing grayscale parameters, finding hook for upcoming upload processing