Handle properly undo groups in embedded work areas
When a buffer is in an embedded work area (adv. find&replace), it is
not found by BufferList:::exists(), and therefore the undo group
created in GuiApplication::dispatch and in the handling of
LFUN_COMMAND_SEQUENCE will not be closed.. Crashes can ensue, as
described in Ubuntu bug:
https://bugs.launchpad.net/bugs/
1737429
The solution is to introduce BufferList::isInternal and act on it.
Fixes bug #10847.
(cherry picked from commit
8b107f0490e61b4390e925f08d21661ef50d6f49)