CB-8472 Can't find config.xml error installing browser platform after plugin.  (close #167)
CB-8472 Can't find config.xml error installing browser platform after plugin.  (close #167)

Recent changes to the process of adding a platform meant we were trying to trying to install plugins for the platform before we had called prepare() for the platform. Also, we were calling prepare() outside the loop that processes each platform, which meant the plaform local variable was not in scope, and we were passing a reference to a function called platform() to prepare() rather than a platform name.

Fixed this by moving the prepare() call back where it used to be - just before we install plugins.

meteor/cordova-lib,AxelNennker/cordova-lib,driftyco/cordova-lib,revolunet/cordova-lib,tripodsan/cordova-lib,alsorokin/cordova-lib,phonegap-build/cordova-lib,csantanapr/cordova-lib,purplecabbage/cordova-lib,cordova-ubuntu/cordova-lib,AxelNennker/cordova-lib,abstractj/cordova-lib,marcuspridham/cordova-lib,purplecabbage/cordova-lib,ktop/cordova-lib,csantanapr/cordova-lib,theaccordance/cordova-lib,tripodsan/cordova-lib,stevengill/cordova-lib,meteor/cordova-lib,surajpindoria/cordova-lib,abstractj/cordova-lib,ogoguel/cordova-lib,abstractj/cordova-lib,abstractj/cordova-lib,jasongin/cordova-lib,purplecabbage/cordova-lib,infil00p/cordova-lib,timwindsor/cordova-lib,stevengill/cordova-lib,theaccordance/cordova-lib,carynbear/cordova-lib,alsorokin/cordova-lib,purplecabbage/cordova-lib,ogoguel/cordova-lib,shazron/cordova-lib,AxelNennker/cordova-lib,abstractj/cordova-lib,revolunet/cordova-lib,csantanapr/cordova-lib,dpogue/cordova-lib,phonegap-build/cordova-lib,phonegap-build/cordova-lib,meteor/cordova-lib,timwindsor/cordova-lib,jasongin/cordova-lib,corimf/cordova-lib,cordova-ubuntu/cordova-lib,jasongin/cordova-lib,carynbear/cordova-lib,vladimir-kotikov/cordova-lib,carynbear/cordova-lib,surajpindoria/cordova-lib,Icenium/cordova-lib,AxelNennker/cordova-lib,corimf/cordova-lib,csantanapr/cordova-lib,csantanapr/cordova-lib,surajpindoria/cordova-lib,purplecabbage/cordova-lib,gorkem/cordova-lib,jasongin/cordova-lib,dpogue/cordova-lib,timwindsor/cordova-lib,vladimir-kotikov/cordova-lib,alsorokin/cordova-lib,stevengill/cordova-lib,tripodsan/cordova-lib,shazron/cordova-lib,tony--/cordova-lib,matrosov-nikita/cordova-lib,Icenium/cordova-lib,Icenium/cordova-lib,Icenium/cordova-lib,apache/cordova-lib,alsorokin/cordova-lib,carynbear/cordova-lib,vladimir-kotikov/cordova-lib,AxelNennker/cordova-lib,infil00p/cordova-lib,dpogue/cordova-lib,dpogue/cordova-lib,theaccordance/cordova-lib,csantanapr/cordova-lib,tripodsan/cordova-lib,gorkem/cordova-lib,meteor/cordova-lib,cordova-ubuntu/cordova-lib,marcuspridham/cordova-lib,dpogue/cordova-lib,jasongin/cordova-lib,ktop/cordova-lib,tony--/cordova-lib,theaccordance/cordova-lib,apache/cordova-lib,dpogue/cordova-lib,matrosov-nikita/cordova-lib,infil00p/cordova-lib,stevengill/cordova-lib,timwindsor/cordova-lib,phonegap-build/cordova-lib,Icenium/cordova-lib,tripodsan/cordova-lib,infil00p/cordova-lib,phonegap-build/cordova-lib,surajpindoria/cordova-lib,surajpindoria/cordova-lib,driftyco/cordova-lib,corimf/cordova-lib,shazron/cordova-lib,filmaj/cordova-lib,corimf/cordova-lib,ogoguel/cordova-lib,driftyco/cordova-lib,stevengill/cordova-lib,AxelNennker/cordova-lib,matrosov-nikita/cordova-lib,carynbear/cordova-lib,matrosov-nikita/cordova-lib,theaccordance/cordova-lib,Icenium/cordova-lib,matrosov-nikita/cordova-lib,alsorokin/cordova-lib,revolunet/cordova-lib,meteor/cordova-lib,gorkem/cordova-lib,revolunet/cordova-lib,revolunet/cordova-lib,meteor/cordova-lib,surajpindoria/cordova-lib,tony--/cordova-lib,AxelNennker/cordova-lib,gorkem/cordova-lib,gorkem/cordova-lib,stevengill/cordova-lib,ogoguel/cordova-lib,vladimir-kotikov/cordova-lib,timwindsor/cordova-lib,apache/cordova-lib,tony--/cordova-lib,marcuspridham/cordova-lib,cordova-ubuntu/cordova-lib,ogoguel/cordova-lib,meteor/cordova-lib,abstractj/cordova-lib,matrosov-nikita/cordova-lib,gorkem/cordova-lib,carynbear/cordova-lib,tony--/cordova-lib,apache/cordova-lib,vladimir-kotikov/cordova-lib,tripodsan/cordova-lib,ktop/cordova-lib,jasongin/cordova-lib,purplecabbage/cordova-lib,shazron/cordova-lib,corimf/cordova-lib,filmaj/cordova-lib,ogoguel/cordova-lib,carynbear/cordova-lib,driftyco/cordova-lib,vladimir-kotikov/cordova-lib,ktop/cordova-lib,corimf/cordova-lib,shazron/cordova-lib,timwindsor/cordova-lib,abstractj/cordova-lib,phonegap-build/cordova-lib,jasongin/cordova-lib,revolunet/cordova-lib,filmaj/cordova-lib,filmaj/cordova-lib,shazron/cordova-lib,csantanapr/cordova-lib,driftyco/cordova-lib,marcuspridham/cordova-lib,tony--/cordova-lib,apache/cordova-lib,infil00p/cordova-lib,theaccordance/cordova-lib,marcuspridham/cordova-lib,driftyco/cordova-lib,revolunet/cordova-lib,timwindsor/cordova-lib,marcuspridham/cordova-lib,marcuspridham/cordova-lib,filmaj/cordova-lib,corimf/cordova-lib,Icenium/cordova-lib,alsorokin/cordova-lib,theaccordance/cordova-lib,alsorokin/cordova-lib,infil00p/cordova-lib,ktop/cordova-lib,tony--/cordova-lib,cordova-ubuntu/cordova-lib,cordova-ubuntu/cordova-lib,vladimir-kotikov/cordova-lib,cordova-ubuntu/cordova-lib,tripodsan/cordova-lib,surajpindoria/cordova-lib,infil00p/cordova-lib,filmaj/cordova-lib,ktop/cordova-lib,driftyco/cordova-lib,gorkem/cordova-lib,ogoguel/cordova-lib