Avoid infinite recursion formatting (a+b)[x] (issue #151)
Parenthesize f[a] in f[a][b] if necessary (issue #151)

Fixes missing parens when formatting (a+b)[x]
Add tests for issue #151
Fix precedence when parenthesizing heads

Just set this to 670, as it looks like this is the value that
Mathematica uses.
Merge pull request #166 from bnjones/issue151

Fix for issue #151: problems with (a+b)[x]
remove django test page