Deduplicating dependencies of dependencies

Hello eford, sho, 

Please review the following commits I made in branch 'jeremy-moreperf'.

66acfd998f98d3c7990deea76d5b91961669b766 (2013-03-15 11:52:30 -0700)
Deduplicating common dependencies

3a9b05177a6bd7f5421dac2395d498a1f52fadcf (2013-03-14 19:09:37 -0700)
More perf changes

R=eford
R=sho