Compute distro_target from the -p option for rooted environment.

**Problem:**
SMT requires a distro_target for the /connect/subscriptions/systems
post request. This value is usually fetched from
/etc/products.d/baseproduct, but that file doesn't exist when
registering to create a rootfs from scratch.

**Solution:**
This commit tries hard to compute a distro_target value from the
product.