fix #127 so that the correct build status is shown

The big issue is that we assumed the correct build status was the first on in
the array which appears to not be true as the last one (by visual inspection)
appears to always be the most current one.

To future proof this area of the code a sort of the build status has been added
so that the we do not depend on the order returned by GitHub.
Merge pull request #127 from trestle-pm/bug/127_wrong_build_status

Build Status wrong