[api] refactor status controller

move function to find a buildstatus of a specific package revision into the package model