Add hooks for context menus
work around linux crash on paste

https://anki.tenderapp.com/discussions/ankidesktop/2019-inaccessible-firewall-blocked-media-url-paste-hangs-anki-for-a-minute-until-a-network-is-unreachable-like-message-appears
Merge pull request #40 from steveaw/add-hooks3

Add hooks for context menus
escape + in deck names
warn when prefs.db corrupt and catch another case
remove filtered deck restriction on stats
allow includegraphics in latex
fix incorrect code that was not restoring clipboard
don't try to download local image urls
starting easy should go no lower than 130%
remove redundant regex in latex code
work around crash on close when card layout opened on windows (#940)
unused media tooltip patch from julien baley (removed redundant .finish())
bump version
Merge remote-tracking branch 'dae/master' into feature-flake

Conflicts:
	aqt/__init__.py
	aqt/addcards.py
	aqt/editor.py
	aqt/profiles.py
	aqt/webview.py
Re-clean.
don't die if autojunk unavailable (#952)
allow updates to existing notes in .apkg import
unbury in deckbrowser, not deckduelist() (#946)
rework sibling handling and change bury semantics

First, burying changes:

- unburying now happens on day rollover, or when manually unburying from
  overview screen

- burying is not performed when returning to deck list, or when closing
  collection, so burying now must mark cards as modified to ensure sync
  consistent

- because they're no longer temporary to a session, make sure we exclude them
  in filtered decks in -is:suspended

Sibling spacing changes:

- core behaviour now based on automatically burying related cards when we
  answer a card

- applies to reviews, optionally to new cards, and never to cards in the
  learning queue (partly because we can't suspend/bury cards in that queue at
  the moment)

- this means spacing works consistently in filtered decks now, works on
  reviews even when user is late to review, and provides better separation of
  new cards

- if burying new cards disabled, we just discard them from the current queue.
  an option to set due=ord*space+due would be nicer, but would require
  changing a lot of code and is more appropriate for a future major version
  change. discarding from queue suffers from the same issue as the new card
  cycling in that queue rebuilds may cause cards to be shown close together,
  so the default burying behaviour is preferable

- refer to them as 'related cards' rather than 'siblings'

These changes don't require any changes to the database format, so they
should hopefully coexist with older clients without issue.