Running into context error
Change:

bpy.ops.clip.filter_tracks(override['area'], track_threshold=5)


To:

bpy.ops.clip.filter_tracks(track_threshold=5)


And see if that works.

I'm not that familiar with what you are doing, however the reason I believe that you need to take out the extra argument is because of inspecting the auto-complete of the function when I enter it in directly at the console (it just seems like there is a problem with passing more than the threshold value - See Below):



After looking into this a little further, try just commenting this line out.

From the Manual it is meant to smooth out spikes in the track, the problem with this (this context) is: you just deleted the "spike" in your previous line of code, so there is no track to even deal with.

Or 

Maybe you just need to check and see if the previous statement deleted the track. Then set a variable to indicate if the track was deleted, then you can make a decision to filter it or not based on that.