Bazel to CMake: Add processing based on current file state
Bazel to CMake: Add processing based on current file state

1. Preserve copyright year.
2. Don't overwrite files with a special blocking incantation.
3. Only add subdirectories if they have CMakeLists.txt files.
4. To facilitate (3), process directories bottom-up

Depends on https://github.com/google/iree/pull/589

Tested:
Verified it no longer overrides copyright headers
```shell
$ ./build_tools/scripts/bazel_to_cmake.py --dir iree/compiler
```
is a no-op

Verified it does not add subdirectories with no CMakeLists.txt file
```shell
$ ./build_tools/scripts/bazel_to_cmake.py --dir iree/compiler/Dialect/Flow/Conversion/HLOToFlow
```
is a no-op

Ran preview entire project and saw no new errors
```shell
$ ./build_tools/scripts/bazel_to_cmake.py --preview | grep -i error
    "status_errors.h"
    "status_win32_errors.h"
    "status_errors.cc"
    "status_win32_errors.cc"
  Reason: `NameError: name 'platform_trampoline_deps' is not defined`
  Reason: `NameError: name 'iree_flatbuffer_cc_library' is not defined`
  Reason: `NameError: name 'PLATFORM_VULKAN_TEST_DEPS' is not defined`
  Reason: `NameError: name 'PLATFORM_VULKAN_LOADER_COPTS' is not defined`
  Reason: `KeyError: "No conversion found for target '//third_party/dawn:dawn_headers'"`
  Reason: `NameError: name 'platform_trampoline_deps' is not defined`
  Reason: `KeyError: '@llvm-project//llvm:tablegen'`
  Reason: `NameError: name 'PLATFORM_VULKAN_DEPS' is not defined`
  Reason: `NameError: name 'PLATFORM_VULKAN_TEST_DEPS' is not defined`
  Reason: `KeyError: "No conversion found for target '@dear_imgui'"`
```

Closes https://github.com/google/iree/pull/590

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/590 from GMNGeoffrey:bazel-to-cmake-2-current-file-state 9bd1315a5a5bd17859f6a9bedb69548ac5d0388f
PiperOrigin-RevId: 292021380

iree-org/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,iree-org/iree,google/iree,iree-org/iree,google/iree,google/iree