Fix warning from Clang about comparing an enum value to -1

We use a quick hack around libconfuse to detect if a value was specified
or not in a definition. For testing the boolean's there is an enum using
0 and 1 for false and true. We set these by default to -1 as a test of
if they were actually set by libconfuse or not. Clang complained that -1
wasn't a valid value for that enum, but casting to an int solves the
issue.
Move main to it's own file

Main was in an awkward location, this moves it outside of fircd.c
Modify traveral setup to not require a callback

This patch changes the traveral algorithms to keep returning the next
rbnode in the traveral instead of calling a callback on every node. This
simplifies code since it means simple traverals don't require full
functions to get an address of.