Hyperedge Replacement Jungle Rewriting for Term-Rewriting Systems and Programming