Setitem array slice

Fix for bug #587  
Incorporated Antoine's suggestions 
Also includes a printf fix in cgutils.py and a compiler warning fix in _numpyadapt.c

As the fix is not really part of the setitem slice bugfix I will remove it and work on it separately. As you point out, it is more than just a simple cast.