Aberdeen duo Stephen Hughes and Gary Naysmith have agreed new deals to extend their stays at Pittodrie.