fix bug in reconfig exit code + improve exit codes returned

Changed the exit codes returned by the init script to comply with LSB recommendations.
Added constants with the exit codes

reconfig and upgrade in frontend/factory were returning:
- stopped, reconfigured and started: 0/0
- reconfigured a stopped service: 0/0
- failed to stop (if initially running): 1/1
- failed to reconfigure (even if started with old configuration): 0*/1
- failed to start (after stopping and reconfiguring, even if reconfigure failed): 1/1

* There was a bug in the frontend behavior not detecting the failed to configure (only an XML error was printed). This has been fixed!

The new behavior is similar except:

If not installed (start or check executables missing) fail exit code: 5   (before was 1 because invocation failed)

reconfig and upgrade in frontend/factory are now returning:
- failed to reconfigure (even if started with old configuration): 6/6
- failed to start (after stopping and reconfiguring, even if reconfigure failed): 1/1
To comply with LSB suggestions (1 was OK but 6 is better)
improved exit codes to comply with LSB

Changed the exit codes returned by the init script to comply with LSB recommendations.
Added constants with the exit codes

reconfig and upgrade in frontend/factory were returning:
- stopped, reconfigured and started: 0/0
- reconfigured a stopped service: 0/0
- failed to stop (if initially running): 1/1
- failed to reconfigure (even if started with old configuration): 1/1
- failed to start (after stopping and reconfiguring, even if reconfigure failed): 1/1

The new behavior is similar except:

If not installed (start or check executables missing) fail exit code: 5   (before was 1 because invocation failed)

reconfig and upgrade in frontend/factory are now returning:
- failed to reconfigure (even if started with old configuration): 6/6
- failed to start (after stopping and reconfiguring, even if reconfigure failed): 1/1
To comply with LSB suggestions (1 was OK but 6 is better)
added comment to make the logic more clear
Merge branch 'v3/6300' into branch_v3_2
Redmine #6300 - Starting/stopping return codes not confirming to Linux standards