Fixes for builds

Correct host docker socket logic (it was doing docker-in-docker if
USE_HOST_DOCKER_SOCKET was set, and vice versa) and add unit test for it.

Add SourceRef to BuildInput and correct the STI build strategy to use
SourceURI and SourceRef appropriately.
Hrm, in other places we do the URI form where # at the end is used, but I think I'm ok with this for now.