use delete!(s,k,nothing) instead of contains(s,k) && delete!(s,k).

Close #3401. This avoids having to do the element lookup twice.