Improve logging and handling of null values in RuleEngine

This pull request results from the analysis of #1742:
- Improved robustness of RuleEngine against NullPointerExceptions (if ScriptExecutionException contains no cause or no cause message).
- Fix log error caused by demo.rules when no weather history exists yet. Before the fix it could happen that toString was called on a null value.