scanner: add a new --include-core-only option
scanner: add a new --include-core-only option

When using this new option the generated code will include the new
core headers instead of the old ones. The default needs to remain
unchanged for backward compatibility with old code.
With this change the generated headers will now forward declare all
types and interfaces it uses; that is needed when generating headers
for a my-extension.xml with --include-core-only, since it may use
types defined in wayland.xml.
The same is done also without --include-core-only, since it is an
harmless change.
getopt_long() is used for the option handling.

Reviewed-by: Pekka Paalanen <0f6ae7001e34c37b02fb2c1c2573ddf8f442136a@collabora.co.uk>

tulcod/wayland,bitfactor/wayland,mchalupa/wayland,bitfactor/wayland,mchalupa/wayland,mchalupa/wayland,tulcod/wayland,abooij/wayland,sir-murray/wayland,abooij/wayland,abooij/wayland,sir-murray/wayland,bitfactor/wayland,eyolfson/wayland,eyolfson/wayland,sir-murray/wayland,tulcod/wayland,eyolfson/wayland