perfetto-ui: Add state holder

- Add a new directory: common/ for code which is common to frontend/ and
  controller/ but not general purpose (base/).
- Add the monolithic state interface (common/state.ts).
- Add frontend/globals.ts for global variables the whole frontend needs
  to access. For now this will contain:
  - the state store
  - the dispatch function
  If this grows too much we'll have to revisit and find a better solution
  but for now this seems resonable.

Bug: 111101304
Change-Id: Ia79a0da0e53c19eae5242469aaa6ffdeaa7567f4
diff --git a/ui/src/common/state.ts b/ui/src/common/state.ts
new file mode 100644
index 0000000..3974987
--- /dev/null
+++ b/ui/src/common/state.ts
@@ -0,0 +1,21 @@
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+export interface State { i: number; }
+
+export function createEmptyState(): State {
+  return {
+    i: 0,
+  };
+}