Update flutter_tools to use package:file throughout (#7385)

This removes direct file access from within flutter_tools
in favor of using `package:file` via a `FileSystem` that's
accessed via the `ApplicationContext`.

This lays the groundwork for us to be able to easily swap
out the underlying file system when running Flutter tools,
which will be used to provide a record/replay file system,
analogous to what we have for process invocations.
diff --git a/packages/flutter_tools/lib/src/run.dart b/packages/flutter_tools/lib/src/run.dart
index b8a6562..4465f21 100644
--- a/packages/flutter_tools/lib/src/run.dart
+++ b/packages/flutter_tools/lib/src/run.dart
@@ -3,12 +3,12 @@
 // found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:io';
 
 import 'package:meta/meta.dart';
 import 'package:stack_trace/stack_trace.dart';
 
 import 'application_package.dart';
+import 'base/file_system.dart';
 import 'base/utils.dart';
 import 'build_info.dart';
 import 'commands/trace.dart';
@@ -68,7 +68,7 @@
   }) async {
     if (!prebuiltMode) {
       _mainPath = findMainDartFile(target);
-      if (!FileSystemEntity.isFileSync(_mainPath)) {
+      if (!fs.isFileSync(_mainPath)) {
         String message = 'Tried to run $_mainPath, but that file does not exist.';
         if (target == null)
           message += '\nConsider using the -t option to specify the Dart file to start.';