fix($compile): retain CSS classes added in cloneAttachFn on asynchronous directives

Previously, classes added to asynchronous directive elements during the clone
attach function would not persist after the node is merged with the template, prior
to linking. This change corrects this behaviour and brings it in line with synchronous
directives.

Closes #5439
Closes #5617
fix($q): make $q.reject support `finally` and `catch`

Add support for the functions `finally` and `catch` to the
promise returned by `$q.reject`

Closes #6048
Closes #6076
docs(all): convert <pre>/</pre> snippets to GFM snippets