Spain reopens its borders as state of emergency comes to an end