Remove all using directives for STL namespace and members

Made all STL usages explicit to be able automatically find all usages of
particular class or function.
Fix x64 build warnings
Merge pull request #543 from taka-no-me:explicit_stl
Fix definition of the covariance matrix of derivatives.
Repair build
Merge pull request #566 from FabricioS:master
move device layer functionality to separate module.