make sure we include 'px' in stats (thanks to steveaw)
refactor illegal char handling and file adding for media

- add writeData() so we can add files to media folder without having to
  save them in an intermediate folder first
- we were stripping or checking for illegal filename characters in
  multiple places; factor those checks out into separate routines
- add * to invalid char list, and disallow both forward and backslash
- remove size checks in syncAdd(); is handled server-side
refactor media downloading on paste/drop

- use html as the first choice for incoming drops/pastes
- when filtering incoming html, automatically localize any remote image
  references
- add a special case for pasting/dropping from google images when html
  stripping is on
- move filtering code into editor
if there's no html and we have an image, use that (#915)
make sure we always show 3 buttons for cards in initial learning (#928)

even if there's only a single learning step, the easy bonus means we need to
show both buttons
Revert "when target add deck changed, switch review deck too (#695)"

This reverts commit db262031c30e0649d62cea519334bcdede62ec83.

This addresses issue #929
fix importing with schema change logic

the previous fix for #612 was broken, and led to notes with altered schemas
being imported with the incorrect schema