Log line-at-a-time to work around Android logging lossage.

Also deduplicate the two copies of gettid, and switch image_test over
to using SignalCatcher's SIGQUIT dumping rather than rolling its own
subset.

Change-Id: I8b70aaa3a3b9258c8258728c6a66e5dc4fa6399e
diff --git a/src/logging.h b/src/logging.h
index bf6d179..43596b5 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -1,15 +1,18 @@
-// Copyright 2010 Google
-// 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.
+/*
+ * Copyright (C) 2011 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.
+ */
 
 #ifndef ART_SRC_LOGGING_H_
 #define ART_SRC_LOGGING_H_
@@ -123,10 +126,11 @@
   std::ostream& stream();
 
  private:
+  void LogLine(const char*);
+
   std::stringstream buffer_;
-  std::ios_base::fmtflags stream_state_;
   const char* file_;
-  int line_;
+  int line_number_;
   LogSeverity severity_;
   int errno_;