[JENKINS-21223] Broken differences in build summary for failed builds

- Publishing the SLOCCount report will be skipped if the build fails, no data are stored for it and no data are displayed in build summary.
- SloccountBuildAction.getPreviousAction() updated to search an action with valid data in a loop through previous builds. Builds that failed are skipped since they contain no data.
- Unused imports removed.