Cartesian closed 2-categories and permutation equivalence in higher-order rewriting (Logical Methods in Computer Science, 2013)