Add `flutter precache` (#3207)

This command explicitly populates the flutter tool's cache of binary artifacts.
Also, teach `flutter create` to update the cache in case its the first command
that a user runs.
diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart
index 5079dec..d567d4d 100644
--- a/packages/flutter_tools/lib/src/commands/create.dart
+++ b/packages/flutter_tools/lib/src/commands/create.dart
@@ -11,6 +11,7 @@
 import '../android/android.dart' as android;
 import '../artifacts.dart';
 import '../base/utils.dart';
+import '../cache.dart';
 import '../dart/pub.dart';
 import '../globals.dart';
 import '../template.dart';
@@ -66,6 +67,8 @@
       return 2;
     }
 
+    await Cache.instance.updateAll();
+
     String flutterRoot = path.absolute(ArtifactStore.flutterRoot);
 
     String flutterPackagesDirectory = path.join(flutterRoot, 'packages');
diff --git a/packages/flutter_tools/lib/src/commands/precache.dart b/packages/flutter_tools/lib/src/commands/precache.dart
new file mode 100644
index 0000000..2587f62
--- /dev/null
+++ b/packages/flutter_tools/lib/src/commands/precache.dart
@@ -0,0 +1,23 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:args/command_runner.dart';
+
+import '../cache.dart';
+
+class PrecacheCommand extends Command {
+  @override
+  final String name = 'precache';
+
+  @override
+  final String description = 'Populates the Flutter tool\'s cache of binary artifacts.';
+
+  @override
+  Future<int> run() async {
+    await Cache.instance.updateAll();
+    return 0;
+  }
+}