Fix copy/paste error, and whitespace.
Fix reversion of beamer documents.

Beamer documents do not have a "--Separator--" layout but a
"Separator" one. Also fix a thinko causing the deletion of
"\end_layout" tags in some cases.
Ugly fix for bug #9102

The real problem is the encoding of latex_language: It is hardcoded to latin1,
but InsetListig uses the currently active encoding. Therefore, we cannot tell
whether any given character wil be encodable or not, and we should not prevent
non-ACII characters.
In the future, we need to make the encoding of latex_language dynamic, so that
it always represents the currently active encoding. Then, we could do the
correct check both for listings and ERT. For now, I simply disabled the
encoding check for listings, which also means that bug 9012 might occur in
other cases for listings, but this is less important than bug 9102.
Move code where it belongs

It is declared in Dimension.h, so the implementation should be in
Dimension.cpp.
Remove unneeded slash

addPath() always adds a slash at the end, os got a double one before.
Qt and the OS are clever enough to understand that, but a single slash
looks more nice.
Fix bug 9030 except for windows

The format entries should be sorted according to the culture selected for the
UI. This was not the case previously, resulting in unexpected sorting of small
and capital letters. This is now fixed by using the standard C function
strcoll(). Qt does only offer similar functionality in Qt5, and this is not
mature enough yet to depend on it.
Unfortunately we have a report that strcoll() does not work on MSVC, however
this partial fix is better than nothing. The MSVC issue might also be a
configuration problem, since MS claims that strcoll() is supported. This
still needs to be checked.
Initialize all members
Fix compilation after afc34c7a