genereally speaking, editing before tracking everything else. makes sense, since you want everything else to be tight not only to the click but also to the drums, hence the drums have to be tight to the click first.
sample replacing, well, i tend to sample all the trigger only tracks (obviously) with a sample that is at least close to what i'm envisioning for the final product. support triggering however i'll wait until the mixing stage, at least if the raw tracks are decent (they better be, after all you just finished tracking them). the reasoning is that it's easier to get properly fitting guitar/bass tones if your drums are already in the ballpark of the final product. it doesn't make a lot of sense to track guitars to a totally raw drumsound, get the gtrs to slot in properly with those, just to change the drums later on. get it close in all stages of tracking and mixing life will be much easier.