basis.template: fix remove-attr/append-attr and style attribute issues, extend template test suite