build: Ignore .gdb_history file.
build: Add *~ to CLEANFILES.
lib: Move the 'offset_list' struct into a separate compilation unit.
Revert "patch for read support of "li"-records from "ri" intermediate"

This reverts commit c29d2625c2286b026c4e36a8b5469991c41b4299.
lib: Add some debugging.
lib: Add a DEBUG macro and use it instead of fprintf.

Allows us to control the format of debug messages more carefully.
lib: Add macros for setting errno and checking if the hive is writable.

This is code cleanup, but there are a couple of small changes:

 - the msglvl for errno explanations moves from debug (2) to verbose (1)

 - add and tidy up some of the error messages
Fix .gitignore.
lib: Split up the large file lib/hivex.c into multiple small source files.
lib: get_children: Document the function, and small non-functional cleanups.
lib: get_children: Use offset_list limits to limit length of returned lists.

This will allow us to change the function to work recursively, and
still enforce these limits.
lib: get_children: Refactor this into two functions.

Although this change seems rather large, including removing a large
block of dead code, there should be no functional change.
lib: get_children: Factor out valid block test into separate function.

Just refactoring, no functional change.
lib: get_children: Add additional check that each child is an nk block.
lib: get_children: Handle ri-record by just recursing.

No functional change.
lib: get_children: Add a check that we don't overrun ri-record when reading.
lib: get_children: Handle li-records as intermediate nodes (RHBZ#717583).

This is a full fix for
https://bugzilla.redhat.com/show_bug.cgi?id=717583
lib: node_add_child: Factor out subkey insertion into separate function.

No functional change.
lib: node_add_child: Handle li-records as intermediate notes (RHBZ#987463).

This commit implements adding a child to a registry key that uses
li-records for intermediate nodes.
lib: node_add_child: Checks that we don't extend records beyond maximum number of subkeys permitted.

Previously we didn't check this, so it was possible that
nr_subkeys/nr_offsets would wrap around to 0.