Refactoring.

- Move the native <-> XML-RPC type conversions to specific classes.
- Fix tests.