fix pycaffe input processing

- represent images as [0, 255] single / np.float32 throughout to agree
  with data layers.
- scale feature space after mean subtraction (fix #525).
- preserve type after resizing.
- resize 1, 3, or K channel images with special casing between
  skimage.transform (1 and 3) and scipy.ndimage (K) for speed