Clean up some unused functions, make others static

Adding -Wmissing-prototypes showed some functions could be made static
and my 'findunused' script showed some functions weren't being called.

This patch was tested by building from scratch and running with various
combinations of options.

Signed-off-by: Andrew Price <anprice@redhat.com>
4 files changed