Worst-case optimal approximation algorithms for maximizing triplet consistency within phylogenetic networks