Split basic class parsing out into a seperate function.

This will allow us to parse classes from both the category list handler
as well as the class list handler.

This also adds a new error code, PLCRASH_EINVALID_DATA, which allows us
to differentiate between a bad argument (PLCRASH_EINVAL) and bad data
(PLCRASH_EINVALID_DATA).

Issue: PLCR-495