Remove composite_primary_keys gem (prepare for rails 4.1)

and refactor madek so it doesn't need it
Upgrade gems to rails 4.1.1; require ruby 2.1.1