Augment CSP solver to allow site/device hierarchies in activate_deployment

DO NOT MERGE, currently breaking SMOKE because of some errant rows in preload.

This patch adds the ability for the CSP solver (used when port_assignments are not specified in a deployment) to solve complex hierarchies based on matching the device/site models and the hasDevice/hasSite structure.