InP and InAs nanowires hetero- and homojunctions: energetic stability and electronic properties