port to py3

There are actually 3 commits here.

1. port to py3 is needed to build using scons on py3

2. Improve stride handling - is probably redundant with an existing ndarray branch

3. Include ArrayRef.h is a small patch which I need to build my software, a case of include what you use