On the expressive power of hyperedge-replacement jungle rewriting for term rewriting systems and logic programming