library/form: Append class 'autosubmit' in case the element to autosubmit has the class attribute set

Before, the class attribute would've been overwritten.

refs #5525