Fix datetime/timezone handling in Django <1.4; update management commands to be timezone-aware