Note that I've expanded the quote to include some more context to make it clear that Faulkner is quoting someone relating an incident. Faulkner is reproducing the patterns of somewhat-convoluted speech. The main clause of the direct speech is
That was it
which is followed by two fragments punctuated like sentences that form an appositive to "it," that is naming the situation that "it" refers to. The two fragments are
[Their] Laughing at me
and
Me knowing ..., and them knowing ....
The antecedent to the understood [Their] and the explicitly-stated them is a roomful of French soldiers mentioned previously. The object of what they know is the clause
that if I busted ... dragged ... and bashed, [then] I would not only be cashiered ... [but also] clinked
which I've simplified by ellipsis. It takes Faulkner four prepositional phrases to describe what would get the speaker "clinked for life" (i.e., imprisoned for life).
Is it grammatical? Not strictly, but that often happens with the spoken word, which is what Faulkner has incorporated into his story. And it doesn't matter much if you've won a Nobel Prize for literature.