CLOUDIFY-1993 Fix problems in the initialization code of the rest client. one deprecated constructor is still needed.