preprocessor: A file included from a system header is a system header, too.

This prevents warnings in indirectly included system headers.
preprocessor: Let close_pp_input() handle freeing the input.
preprocessor: Pass a FILE* instead of a input_t* to switch_pp_input().

switch_pp_input() now handles creating the input_t.
preprocessor: Clean up do_include().

* Factorise common code.
* Do not leave behind strings of failed include attempts on the string obstack.
preprocessor: Do not store the file in pp_input_t, get it from the input_t instead.
adt: Factorise common code to find the extension of a path.
parser: Cleanup in parse_reference().