Fix a bunch of warnings that are raised by clang 3.3

Some of these are serious, such as the ones in CockpitRestJson
and others are innocuous, but seem worth fixing so we can rely
on the warnings.