Update secure_img_handler.php

This fix the secure image render problem when it doesn't display properly.

1 - prevent sending different Content-Type header by clearing the buffer.

2 - added imagedestroy to free extra memory.