Maintenance file update
Add _real_escape() override method to SharDB class

This ensures that _doing_it_wrong() notices are not thrown when SharDB
initializes before a database connection is established.
DLBlock fixes:

- Declare previously undeclared global variable
- Hook in earlier than template_redirect. There appears to have been a bug
  that prevented downloads from working correctly on certain MIME types when
  the file was delivered as late as template_redirect. Moving to 'init'
  seems to have solved the problem.

See #1113