Magnetostatic interactions of single-domain nanopillars in quasistatic magnetization states