Distributed scheduling in input queued switches