Fixes from windows build msvc2010

Base problem was templates that return void, which should be
a no no everywhere but worked on gcc. To fix we specialized the
implementation for that. We also took out the earlier workarounds
for windows that confused the compiler even more. Last change was
to use const & args for speed and to help the compiler determine
the type in a few cases.

Change-Id: Id11f46dcadd75ceebe1a7824796900b1e3b78c06