Remove composite_primary_keys gem (prepare for rails 4.1)

and refactor madek so it doesn't need it