how many episodes is season 4 of the flash