folding: add 'stacked' mode, and a command to change folding mode on demand

Implements idea fro issue #89.