tcp: minor cleanup
Fix two KASSERTs to catch the condition they are intended to,
add two asserts to ensure that the appropriate locking is in
place and fix some things related to style.
No functional change intended.
Sponsored by: Netflix, Inc.
(cherry picked from commit 811d831050d172a39c714a3f676722cf9a496a6f)