There are a couple of posts in thread that comply with what I'm going to say, so I won't bother to quote any of them.
Yeah, I think maybe it might be offensive to some people, but I think the book was trying to portray that time period and give a statement about it. If you censor the word, despite being offensive, I think it accurately describes the attitude of that time, and thus dampens the effect of the story and the statement that Twain was trying to make. But I haven't read the book, this is just what I think based on the facts.
Oh, and about the children reading it, either, hold it off until you think they are mature enough to read it, or just let them read it anyway if it's based on learning. I mean, if they do read it in school, the teachers will most likely have enough sense to say " This is a bad word to say, but this is how people were, black people were discriminated against...etc." or something along those lines. And also, in my experience, children know more than they should, and in this case they might learn the word with a warning of its offensive-ness(vocab fail) opposed to learning it from something else and then spouting the word in public like they think it's cool.
tl;dr version : It's a bad idea.