Improvements to slicing support

This implements extended slicing (like used in NumPy/SciPy), and fixes a small bug in test/test.js (to make .alt tests work properly).