GSocket: ignore timed out state when not relevant

Do this by separating the timeout check from the other socket checks.

https://bugzilla.gnome.org/show_bug.cgi?id=726375