General afrouter cleanup.

- Separated backend.go into multiple files.
- Replaced array indexing hack with enum pattern.
- Various renaming for better consistency.
- Removed a few unused structs.
- Replaced a thread with an atomic operation.

Change-Id: I2239692cac21ddb7f513b6d8c247ffa8789714ac
diff --git a/tests/afrouter/suites/test1/test1.json b/tests/afrouter/suites/test1/test1.json
index c0326b1..b11ccec 100644
--- a/tests/afrouter/suites/test1/test1.json
+++ b/tests/afrouter/suites/test1/test1.json
@@ -214,7 +214,7 @@
 				"method":"GetGoroutineCount",
 				"param":"{}",
 				"meta": [ ],
-				"expect":"{Count:45}",
+				"expect":"{Count:43}",
 				"expectMeta": [ ]
 			},
 			"servers": [ ]