test: some angular controller tests added. also modularized resize/DOM parts out of LayoutCtrl to new layout directive