Include what you use

This is a mega-commit - because most of it had to be done in one go
otherwise some commits would fail to compile - that attempts to fix a
few problems with Geany's includes as well as various other related
cleanups. After this change it's easy to use includes and there's
little worry about which order things are included in or who includes
what.

Overview of changes:

* Move GeanyApp into a new header "app.h" and use that everywhere.
* Include "gtkcompat.h" everywhere instead of gtk/gtk.h so that
  everywhere sees the same definitions (not a problem in practice AFAIK
  so this could be changed back if better that way.
* Make geany.h contain not much besides some defines.
* Make sure vte.h and socket.h are guarded with HAVE_* and then remove
  the HAVE_* in all the source files around those includes.
* Include config.h at the start of each file if HAVE_CONFIG_H is defined.
* Go through each source file and make the includes section generally
  like this:
  - Always config.h first as above
  - Then if the file has a header with the same name, include that
  - Then include in alphabetical order each other internal/geany header.
  - Then include standard headers
  - Then include non-standard system headers
  - Then include GLib/GTK+ related stuff
* Doing as above makes it easier to find implicit header include
  dependencies and it exposed quite a few weird problems with includes
  or forward declarations, fix those.
* Try and get most of the struct forward declarations up together
  at the top of headers with a comment explaining why they're F.D.

TODO:
* As always, to test on win32
* As always, to test with not Autotools
* Test plugins better, both builtin and geany-plugins, likely API/ABI bump
* Test with various defines/flags that may change what is included
* win32.[ch] not really touched since I couldn't test