The Gamow shell model with realistic interactions: a theoretical framework for ab initio nuclear structure at drip-lines