Output instance as an array

Added the asArray method as a convenient way of grabbing a
representation of the Hal instance for use as data, e.g. interpreting
request input.
Convert strings to HAL

Added a factory class to build HAL instances from XML and JSON formats
Formatting clean-up
Bool values as strings in XML

Output boolean values explicitly as "true" or "false" to make it more
consistent with the JSON output.
Only add href if link is self link is set
Prevent "empty" keys being added to JSON output
Clean-up formatting
Clean up formatting
Consistent [data, embedded, links] order in output