utils: more verbose error reporting when applying rules

Add more verbose error reporting when applying either access
rules or CIPSO. The key point is to be able to separate whether
error occured during reading or applying phase.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Add possibility of keeping smack_accesses sorted.

Add field sorted to struct smack_accesses, that contains information about
the state of linked list.
For non-sorted list implementation is not changed.
For sorted list, a pair of (subject, object) is a sorting key.
Such sorted list cannot contain more than one entry per pair of
(subject, object) labels. It can be maintained by using functions
smack_accesses_sort, smack_accesses_sort_add and smack_accesses_sort_add_modify
and smack_accesses_is_sorted.

In sort and sort_add functions, if a rule with a given (subject,object) pair
already exists during adding a new rule, the old one is replaced by a new 'set'
rule or modified by the new 'modify' rule.