Const correctness

Another round of const-correctness changes. With this, `toxcore` is more or less complete, though I might have missed a few places.