Cleaned up packet length types in toxcore.

They are now all uint16_t instead of sometimes being uint32_t.

Replaced some other uint32_t with unsigned ints.