Avoid duplicating code in the MotionEstimate test

All the tests of the line search (unoptimized and optimized)
use the exact same copypasted structure. Instead factorize this
into a test function which uses the provided function.
astyle all files
Add func init for welsfillingPred
Add func init on UT source code
Fix gtest build error when OS=msvc.
Merge pull request #792 from zhilwang/msvc-gtest

Fix gtest build error when OS=msvc.
Merge pull request #791 from zhilwang/intraSad

Add func init for welsfillingPred
Merge pull request #788 from mstorsjo/factorize-duplicated-test

Avoid duplicating code in the MotionEstimate test

Approved by Sijia.
Merge pull request #790 from huili2/astyle_all

astyle all files
Fix building gtest on MSVC

The previous define change in 1e607d71 only made it work on MSVC
2005 and 2008, but broke things even more for 2010 and newer.
(One shouldn't override the internal details about which tuple
implementation to use, since one implementation don't work on
all versions.) Since we don't need or use the gtest tuple code,
the simplest workaround used to be just to disable it altogether,
but that was broken in r682 in gtest.

This has been tested and works on MSVC 2005, 2008, 2010, 2012 and
2013.
Merge pull request #793 from mstorsjo/fix-msvc-gtest

Fix building gtest on MSVC 2010 and newer
Merge remote-tracking branch 'upstream/master' into travis.osx