[api] support lastsuccess on /build/$prj/_results

This code may move later to the backend, so we high-jack a backend route
to do API code

If lastsuccess is given, it expects a package to check if it build against
a pathproject with a specific md5sum