Ab initio study of doping effects in the 42214 compounds: A new family of layered iron-based superconductors