Build: Make ml credentials load only if necessary (elastic/elasticsearch#4938)
Build: Make ml credentials load only if necessary (elastic/elasticsearch#4938)

Also, this change allows the credentials to be passed in through
gradle properties, which will allow the unified release to use its own
aws credentials, supplied securely to the build.


Original commit: elastic/x-pack-elasticsearch@62f7a30e590f986179c29400c1b08eb0441ef0c3

robin13/elasticsearch,HonzaKral/elasticsearch,gingerwizard/elasticsearch,HonzaKral/elasticsearch,gingerwizard/elasticsearch,GlenRSmith/elasticsearch,nknize/elasticsearch,gfyoung/elasticsearch,uschindler/elasticsearch,gingerwizard/elasticsearch,gfyoung/elasticsearch,strapdata/elassandra,GlenRSmith/elasticsearch,uschindler/elasticsearch,coding0011/elasticsearch,gingerwizard/elasticsearch,strapdata/elassandra,strapdata/elassandra,gingerwizard/elasticsearch,gfyoung/elasticsearch,gfyoung/elasticsearch,uschindler/elasticsearch,GlenRSmith/elasticsearch,gfyoung/elasticsearch,vroyer/elassandra,scorpionvicky/elasticsearch,gingerwizard/elasticsearch,scorpionvicky/elasticsearch,strapdata/elassandra,nknize/elasticsearch,GlenRSmith/elasticsearch,scorpionvicky/elasticsearch,uschindler/elasticsearch,scorpionvicky/elasticsearch,gingerwizard/elasticsearch,nknize/elasticsearch,coding0011/elasticsearch,coding0011/elasticsearch,nknize/elasticsearch,robin13/elasticsearch,coding0011/elasticsearch,strapdata/elassandra,nknize/elasticsearch,uschindler/elasticsearch,robin13/elasticsearch,scorpionvicky/elasticsearch,robin13/elasticsearch,vroyer/elassandra,vroyer/elassandra,HonzaKral/elasticsearch,robin13/elasticsearch,coding0011/elasticsearch,HonzaKral/elasticsearch,GlenRSmith/elasticsearch