Utility function to add a class to an object. Adds the new class after any existing classes.
add_class(x, cls)
x
object to add a class to.
cls
the class to be added.