build status

As suggested by @daspilker for https://github.com/jenkinsci/job-dsl-plugin/pull/251, I split this into a separate pull request.

## Build Status Condition

The build status condition was previously built using a SimpleCondition. Unfortunately, this generated the wrong XML for the Run Condition Plugin version 1.0: it was generating blobs of the form:

```
<condition class="org.jenkins_ci.plugins.run_condition.core.StatusCondition">
  <worstResult>SUCCESS</worstResult>
  <bestResult>FAILURE</bestResult>
</condition>
```

Whereas using the gui to configure a job generated XML of the form:

```
<condition class="org.jenkins_ci.plugins.run_condition.core.StatusCondition" plugin="run-condition@1.0">
  <worstResult>
    <name>FAILURE</name>
    <ordinal>2</ordinal>
    <color>RED</color>
    <completeBuild>true</completeBuild>
  </worstResult>
  <bestResult>
     <name>SUCCESS</name>
     <ordinal>0</ordinal>
     <color>BLUE</color>
     <completeBuild>true</completeBuild>
  </bestResult>
</condition>
```

Through further experimentation, we found that the `ordinal` tag was necessary and sufficient for jenkins to correctly process the job. Unfortunately, this meant we couldn't use a `SimpleCondition` for build status anymore, as the testing infrastructure wasn't able to handle `SimpleCondition` nodes with children.

## Testing done

In addition to the included tests, we have been using this internally for a while via the following monkey patches:

```
        /*                                                                      
         * A condition that matches if the current build status is better than  
         * or equal to worstResult and worse than or equal to bestResult.       
         *                                                                      
         * Example - the following matches only successful builds.              
         *                                                                      
         *    condition {                                                       
         *        status 'SUCCESS', 'SUCCESS'                                   
         *    }                                                                 
         */                                                                     
        RunConditionContext.metaClass.status { String worstResult, String bestResult = null ->
            bestResult = bestResult ?: worstResult                              
                                                                                
            def statuses = [                                                    
                'SUCCESS',                                                         
                'UNSTABLE',                                                        
                'FAILURE',                                                         
                'NOT_BUILT',                                                       
                'ABORTED',                                                         
            ]                                                                      
                                                                                   
            assert statuses.contains(worstResult)                                  
            assert statuses.contains(bestResult)                                   
                                                                                   
            condition = new SimpleCondition(                                       
                name: 'Status',                                                    
                args: ['worstResult': {                                            
                    ordinal statuses.findIndexOf { it == worstResult }             
                }, 'bestResult': {                                                 
                    ordinal statuses.findIndexOf { it == bestResult }              
                }])                                                                
        }  
```