access/htup_details.h needs to be included since 9.3
code cleanup, making the code style more PostgreSQL-compliant

Includes refactorings with either no or only minor changes to functionality.
Also a bunch of TODO / FIXME items.