Template various vision helper functions

This enables them to take ceres::Jets to do automatic differentiation.

Change-Id: I63b0bf2af59fa399ec11ce6072126d34a13a14df
diff --git a/aos/vision/math/BUILD b/aos/vision/math/BUILD
index 3233bc9..0fbdf7a 100644
--- a/aos/vision/math/BUILD
+++ b/aos/vision/math/BUILD
@@ -13,6 +13,7 @@
     ],
     deps = [
         "//third_party/eigen",
+        "@com_google_ceres_solver//:ceres",
     ],
 )