How many miles before the runway should an airliner put the gear down?
To answer the last part of your question, as ratchet freak said, the TCAS doesn't warn the pilot when he should deploy landing gear. However, the ground proximity warning system/terrain avoidance and warning system (GPWS/TAWS) does. GPWS Mode 4A is "Unsafe Terrain Clearance With Landing Gear Not Down". 

If the plane is less than 700ft (based on the radio altimeter's measure) high and under mach .35, there is an aural alert in the cockpit saying "Too low - gear". The message is repeated until the situation is corrected.

So the warning is based on the height and speed of the aircraft. Not on its distance to the airport.