NGI_pipeline working version

It is still under testing but it should be pretty stable: @mario please review it carefully
the truth is that I didn't even know that shelve existed, SQLite sounds like something more robust though, if you feel like changing it. I don't have a strong opinion though, something like Redis would definitely be better but maybe not worth the effort.