Refactor: libcrmcommon: apply_upgrade() now takes schema index instead of schema
... which is less efficient for now but will make more sense after planned
changes. Also, make xml argument const for this and apply_transformation(), and
add doxygen blocks.