[FIX] Failure when enabling RB plugin

Fix bug introduced in 39db41f8; dbi is None but the check was missing
[FIX] Explicit db commit calls

Add final dbi.commit() calls when the loop before committed every N
records. This might not be necesasry since chances are good there's a
commit somewhere in the calling code but it's cleaner - otherwise some
of the function's data is committed right inside but the last few
items aren't.
[FIX] Pillow instead of PIL in setup.py

9b544a2 switched from PIL to Pillow but setup.py still referenced PIL.
This causes both to be installed which is a bad idea:
"PIL and Pillow currently cannot co-exist in the same environment"
[MIN] PEP8, obsolete/unused variable
[FIX] Deprecation warning in IPython 1.0+