[tinyobjloader] Improve float parsing speed

We replace tinyobjloader's implementation of float parsing with a faster
call to strtod_l.

--- tiny_obj_loader.h
+++ tiny_obj_loader.h
@@ -63,6 +63,14 @@
 #include <map>
 #include <string>
 #include <vector>
+#include <math.h>
+#include <stdlib.h>
+
+#if defined(__APPLE__)
+#include <xlocale.h>
+#else
+#include <locale.h>
+#endif
 
 namespace tinyobj {
 
@@ -840,6 +848,24 @@
     return false;
   }
 
+  // This is the beginning of Drake's re-implementation.
+#if defined(__APPLE__)
+  static locale_t c_locale = newlocale(LC_ALL_MASK, NULL, NULL);
+#else
+  static locale_t c_locale = newlocale(LC_ALL_MASK, "C", (locale_t)0);
+#endif
+
+  char *str_end = NULL;
+  const double val = strtod_l(s, &str_end, c_locale);
+  if (str_end != s && isfinite(val)) {
+    *result = val;
+    return true;
+  } else {
+    return false;
+  }
+
+  // What follows is the disabled upstream implementation.
+#if 0
   double mantissa = 0.0;
   // This exponent is base 2 rather than 10.
   // However the exponent we parse is supposed to be one of ten,
@@ -959,6 +985,7 @@
   return true;
 fail:
   return false;
+#endif  // #if 0
 }
 
 static inline real_t parseReal(const char **token, double default_value = 0.0) {
