fixes for _setBinaryPrimaryKey
a few more unit tests
a few more test cases
more test cases and minor fixes for datasource