Fixed the model fix process through GUI on MacOSX

The script startapp has been updated to return a message with status
code in order to GUI identify when the process must end. This is a
temporary implementation and may be changed in the future.

Fixed the compilation of sample plugins on MacOSX
Minor change on startapp script (MacOS X)

Temporary fix for strange crash on MacOSX. This crash was happening
whenever the user closed the application.
Fixed sample2.dbm structure
Rolled back to Qt 5.2.1 the version used by the macdeploy.sh script due
to crash reported in issue #494 and #482
Merge branch 'macosx-fixmodel-fix' into develop