Move logic that decides whether to show shoppingcart to middleware

Middleware is a better place for this, rather than navigation.html
template
pep8 + pylint
use context processor instead of middleware
make condition inline
Merge pull request #1357 from edx/jbau/shoppingcart-user-middleware

Jbau/shoppingcart user middleware