Custom laser resonators using graded-phase mirrors