...
This is a really common-sense change to the code, so hopefully it will be accepted. It looks like the Drupal 7 version is re-written so it's only 6.x-1.x we need to worry about.
mobile_tools
Problem
Mobile_tools will add to the = $_SESSION value on every pageload, thus creating a session cookie and breaking caching.
Solutions
Do it in Varnish
I have not done this yet, but here are examples:
http://www.varnish-cache.org/trac/wiki/VCLExampleRedirectInVCL
http://www.varnish-cache.org/trac/wiki/VCLExampleHostnameRemapping
The mobile_tools PHP code has a much more complete regex of mobile user agents, that should probably be copied into any vcl solution.