Improve unittest coverage of entrynodes.c

entrynodes.c is not very well tested unfortunately. Only 2% of it is.

As part of the legacy/trac#11480 (moved) adventures, we should aim to write some more unit tests.

I'm planning to try to write at least unit tests for choose_random_entry_impl(), which is one of the stars of entrynodes.c.