Move image-related code from markdown.js to image.js

+ Change logic detecting if article was modified
Fixes #43
Status Job ID Name Coverage
  Test
passed #165
basictest

00:01:21

failed #166
unittest

00:00:30

 
Name Stage Failure
failed
unittest Test There is an unknown failure, please try again
=============================== Coverage summary ===============================
Statements : 34.62% ( 63/182 )
Branches : 32.26% ( 20/62 )
Functions : 6.9% ( 2/29 )
Lines : 34.12% ( 58/170 )
================================================================================
npm ERR! Test failed. See above for more details.

ERROR: Build failed: exit status 1