[omx] Avoid hang following jpegs that failed to decode

There's a few instanced of xbmc hanging following a jpeg that failed to decode on GPU:
http://forum.stmlabs.com/showthread.php?tid=14839
https://github.com/raspberrypi/firmware/issues/288
http://openelec.tv/forum/120-news-announcements/70709-openelec-4-0-released?start=15#105219

It should fail and continue with software decode. It hangs on the OMX_FreeBuffer call.
Looks like image_decode component should be returned to idle state before freeing buffers
when operation did not complete successfully
Merge pull request #5090 from popcornmix/jpeghang

[omx] Avoid hang following jpegs that failed to decode