Correct handling of frame indices in detector scene and associated spin boxes
This solves the various bugs reported in #515 (closed).
For the benefit of not so computer minded users, displayed indices run from 1 to N. This requires conversions at the right places, as internally indices go from 0 to N-1.