Cortical functional connectivity indexes arousal state during sleep and anesthesia