Adds a hierarchy for conditions, making them easier to handle.

Errors hierarchy is divided between those raised when decoding some json input (yason-parse-error) and those raised when encoding some json data (encode-error), and all these inherit from yason-error.