fixed extraction of scalar cubes

Fixes #1140 so that cube.extract() works on scalar cubes. Also fixes issue with cubelists.