flashmap: add fmap_unittest.py

- Remove test functionality from fmap.py's main
  function and replace with appropriate unit tests
  in fmap_unittest.py
- Bring over some formatting and lint fixes from
  factory/setup/fmap.py
- Add *.pyc to .gitignore

BUG=chromium:726356
TEST=ran unit tests

Change-Id: I4cb99efa3d924483dfdff9be54f6c3fc10040f3f
Reviewed-on: https://chromium-review.googlesource.com/516242
Commit-Ready: Drew Davenport <ddavenport@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
3 files changed