restore "red X" build failures in Travis
add -fPIC flag to CMake build
Merge pull request #1051 from jeffdonahue/travis-red-errors

restore "red X" build failures in Travis
Produce the layers using the abstract factory pattern for simplicity
No more duplication in the layer factories