Read filetype's mime type from the configuration files

This allows custom filetypes to define a mime type, hence the icon
displayed for this filetype;  as well as moving ones for built-in
filetypes out of the code to the configuration files.
Use GIcon for the filetype icon rather than rendered pixbuf

This allows to re-use the icon more easily since it's not rendered at
a particular size but simply an icon description.  It also allows for
implicit icon updating when the theme changes if the display code
implements it (and GTK widgets does).
updated lithuanian translation
Include missing header

It seems this header is necessary on Windows 7 or newer gcc versions
(not sure which one requires it) but according to the docs, it is
necessary anyways.
Add /waf-* to exclude Waf on Windows
Change include order on Windows

As suggested by a preprocessor warning from winsock2.h
(i686-w64-mingw32/include/winsock2.h:15:2: warning: #warning Please
include winsock2.h before windows.h).
Update of Galician translation by José Manuel Castroagudín Silva
Update NEWS with newer changes
Fix replacing colors with "0x" prefix with length different than 6

We used to assume that if the selected text started with "0x" when
inserting a color, we had to replace exactly 6 bytes after the "0x"
prefix.  Although this is generally the case as most color formats use
6 hexadecimal digits, it still would erase either too many or too few
characters if actually replacing something shorter (i.e. "0xfff") or
longer (i.e. "0xffffffffffff").

It could even partially override multi-byte characters if the 8th byte
after the selection start was in the middle of a character, as the
length was in bytes and not characters.

Fix this by honoring the actual selection end.
Export: don't try to read past the document end

A faulty bound checking resulted in reading a byte past the document
end, which resulted in Scintilla returning byte 0 because the position
was invalid.  By adding this NUL byte to the string used to build the
body, the body was truncated after the last document byte (as C strings
are NUL-terminated), leading to any format structure after it to be
missing from the output.

This broke HTML and LaTeX export if the last line didn't end with a
newline, as the last line's style closing structure were missing.
Export: don't include unused, random styles

Fix the bounds checking on included styles only to check for inclusion
actually defined styles, not to include random styles based on
uninitialized array indices.
Export: fix LaTeX export for more than 2 consecutive '-', '<' or '>'

Fix escaping of '-', '<' and '>' characters to properly handle inputs
with more than 2 consecutive identical characters of this set.
Export: use `DOC_FILENAME()` instead of re-implementing it manually
Export: escape file name in case it contains HTML control characters
Merge branch 'export/fixes'
Update NEWS
Update of Catalan translation
Update of Kazakh translation
Update NEWS with recent translation updates
Update of Russian translation