A man who stalked Strictly Come Dancing judge Shirley Ballas for six years has avoided jail.