net.c: Minor cleanup + improve UDP error logging + minor fixes
net.c: Minor cleanup + improve UDP error logging + minor fixes

Replaced the uninformative g_warning() with a more informative
g_message(). Hopefully I'll now know why some UDP messages can't be
sent.

Added an assertion to net_sendfile().

Make sure to not send an empty command in handle_timer() when
file_left > 0. This couldn't happen since keepalive is always disabled
for connections that upload files, but better to handle that as well in
case it does happen.

srijan/ncdc,Tilka/ncdc,srijan/ncdc,srijan/ncdc,Tilka/ncdc