Move most of header check to autoconf.

As well as remove support for system doesn't have getrusage().
This will be resotred later.
Delete SIGNED and VOLATILE macros.