Fix splice arguments and `socket.rooms` value update in `socket.leaveAll`

Made the room management test slightly more complicated to spot the error with splice, fixed it (props @Marreck) and did the same with `socket.leaveAll` not updating the rooms array.

Addressing #1697