autoconf: trim duplicated headers

And sort the header list to help maintain uniqueness.

Signed-off-by: Loic Dachary <loic@dachary.org>