[skimg.io._plugins.freeimage_plugin] fix segfault

I have moved the freeimage error handler callback function to the module
namespace to prevent it being garbage collected. See the following for
more info on this quirk of ctypes:
http://stackoverflow.com/questions/12995925/how-to-prevent-functype-from-being-collected
https://github.com/JohannesBuchner/PyMultiNest/issues/5

This also changes the way FreeImage errors are handled. If an exception
is raised in a callback, it will not propagate beyond ctypes internals.
Now, we use a callback that sets a global variable to indicate error. We
then check for error and reset the error string to NULL every time the
C api is called. This is the only way we can both:
 a) Not segfault on freeimage error
 b) Pass the freeimage error to the user
 c) raise RuntimeError()
[freeimage tests] Add a test w/ truncated image

This tests tests the fix in the previous commit b9a7445, covering the
issue noted in issue #1037.
[test_freeimage.py] remove extraneous statements
[test_freeimage] Allow ValueError to be raised

With the truncated image, sometimes ValueError is raised. This allows
either RuntimeError (i.e. libfreeimage error) or ValueError to be
raised.
[skimage.io.tests] add truncated jpg imread tests
Merge pull request #1039 from kdmurray91/fix_freeimage_segfault

Fix freeimage segfault with a broken/truncated JPEG