Split out analyze and bin dumper to separate frontends

Now that the wayland-tracer has become a standalone project, I decide
that the code should become more modular to let in possible
improvements. This is the first step of this change. It doesn't change
the behaivor or functionality of the program very much. The change is to
split out the "dumper functions" into frontends. Backends should follow
in future development, planned backends are plain text and json.

There are some terribly dirty hacks added because of this change. They
will be eliminated when the whole structure change completes.