Initial refactor

Turning the serializer inside out. It now only serialializes objects,
but doesn't require a name parameter and won't have an outer shell. Good
for non JValue output which cant be pattern matched to remove the outer
shell.