updated forloops to for-from style recommended by cython instead of rely...

Was reading through the Cython [overview](https://github.com/cython/cython/blob/master/Doc/overview.html) (or a different but readable version [here](http://wiki.cython.org/loops)) on the plane today about avoiding using ``range()`` within Cython forloops as it still uses the rich Python API. Using the for-from syntax allows for basically a 1-1 mapping directly to C. Should improve ``keys()`` and ``items()`` performance a good amount, and these are blocks of code used extensively in ``SparseMat``.

On a side note, did anyone know that Python accepts a for-else statement?

```python
for i in range(10):
  print i
else:
  print "foo"
```