Cleanup in serializer_context_new()

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Prettify ws_serializer_json_serializer_new()

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Rewrite callback selection in serializer

This patch rewrites the sub-callback selection and calling in the
serializers serialize() callback.

The indention of this patch is mainly maintainability, as more callbacks
can be added with ease.

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Add: @todo free buffer here?

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Remove variable in favor of direct access

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Move variable declaration

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Fix god damn fucking ugly compiler warning suppression fuckup

I feel ashamed. Please don't chop my head of because of this code!

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Simplify multi-line

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Reuse temporary variable

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Remove temporary variable by embedding function call

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Remove some unneccessary scopes

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Cleanup status checking and remove unneccessary scopes

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Fix indentation in serializer_object_to_id_string()

Pair-programmed-with: Manuel Johannes Messner <manuel.johannes.messner@hs-furtwangen.de>
Merge pull request #476 from matthiasbeyer/cleanup-serializer

Cleanup serializer