Directional Versus Omnidirectional Antennas for Energy Consumption and k-Connectivity of Networks of Sensors