Input-queued switches with logarithmic delay: necessary conditions and a reconfigurable scheduling algorithm