Touching a carcass of an animal although it may render a Nozir impure is permitted and would not render his nezirus invalid source is Pesachim 80b:
טומאת התהום דשרץ ובמאי עסקינן אי נימא בבעלים ובמאן אי בנזיר מי מהני ביה (במדבר ו), כי ימות מת עליו אמר רחמנא
- is unknown Tuma (impurity) of touching a sheretz (or a neveila) in a case of Nazir forbiddon? Surely not Because it state "if a dead man dies with him" (Bamidbar 6,9) i.e only a dead man invalidates his nezirus.
Your second question about killing the philistines with the jawbone of the animal the gemoro nazir 4b adresses your question:
ומנלן דאיטמי למתים אילימא מדכתיב (שופטים טו,טז) בלחי החמור הכיתי אלף איש דילמא גרויי גרי בהו ולא נגע בהו
And from where do we derive that Samson became impure from corpses? If we say it is from the fact that it is written: “And Samson said: With the jawbone of an ass, I smote a thousand men” (Judges 15:16), perhaps he thrust the jawbone at them but did not touch them, and he remained pure.
אלא מהכא (שופטים יד, יט) ויך מהם שלשים איש ויקח את חליצותם דילמא אשלחינון ברישא והדר קטלינן ויך ויקח כתיב
Rather, it is derived from here: “And he smote thirty men of them, and took their garments” (Judges 14:19). Since he stripped the clothes off the dead he must have come into contact with them. The Gemara counters: Perhaps he stripped them first and afterward killed them. The Gemara responds: It is written: “And he smote…and took,” in that order, indicating that first he killed them and then he took their clothing.
ודילמא גוססין שוינן אלא גמרא גמירי לה
But perhaps he mortally wounded them and thereby caused them to be in the process of dying, and he then took their clothes before they died so that he would not touch their corpses. Rather, it must be concluded that it is learned as a tradition that Samson wa allowed become impure from corpses even though there is no proof from scripture.
So we see there is no proof Shimshon violated any form of nezirus but at the same time oral tradition dictates that his special Nezirus called "nazir Shimshon" would be permitted to come in contact with dead bodies and only prohibited to cut his hair or drink wine (or eat grapes)