A coinductive treatment of infinitary term rewriting and equational reasoning