compare.js: update function compare()

Use easiest comparaisons bettween two values.
fix #3288
Status Job ID Name Coverage
  Test Tools
passed #117288
test_tools

00:00:03

 
  Test Quality
passed #117289
web
code_quality

00:00:10

 
  Test Unit
passed #117290
web
test_browser_unit

00:00:10

 
  Deploy Review
passed #117291
web
deploy_review

00:00:07

manual #117292
web allowed to fail manual
stop_deploy_review
 
  Test Functional
passed #117293
web
test_browser-functional

00:03:32

 
  Test Functional External
passed #117294
web
test_browser-functional-external

00:02:18