Fixed order of includes in all source files

- Changed order according to the (upcoming) code style guidelines.
- Fixes several issues caused by missing headers when their include
  order is changed or in plugins.

Signed-off-by: Haru <haru@dotalux.com>