libsmack: use common code for smack_accesses_apply() and smack_accesses_save().

Centralizing code that changes internal smack_accesses representation to
text. Internal function accesses_print() now generates output for applying
the rules to kernel and saving them to a file. This allows easier changes
to data structures used by libmskack and makes the code shorter.

Change-Id: I5ab407d76ef3bec07e7f33e8d5d2e31eb7b4e386
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>