fix($compile): copy CSS classes from pre-template node to link node

In synchronous directives (without a templateUrl), classes added to the node
during the clone attach function persist in the post-link function.

Before this patch, classes addedd to asynchronous templates during the clone
attach function would not persist after the node is replaced with the template
prior to linking.

Fixes #5439