Fast and versatile scheduler design for optical packet/burst switching