Fixups for travis configurations

This adds 3.1.x testing, and constrains the versions more correctly.