Pk bugfix

Found a couple of bugs when using models that have primary keys that are not named 'id'. The first was with queries, and the second was with ManyToMany relationships. Regression tests included.

I think there is another, similar bug [here:](https://github.com/lsbardel/python-stdnet/blob/master/stdnet/odm/related.py#L35), but I haven't tested it yet.