first try at cleaning up custom assertions.

 changed `asserttemplateused` and `assertcontains` functions

https://code.djangoproject.com/ticket/20918