Fix wrong test: boolean variable is never negative

This has been spotted by clang++.
Reimplement inset-select-all in a generic way

There are 3 possible actions (in order)
* select current cell
* select all calls of inset
* select the inset from outside (in the containing inset)

This fixes completely #7727.
Merge remote-tracking branch 'github/build-bot-master' into bleeding-edge-master
2014.11.01-16.00