Adding Unit tests for edd_get_users_purchased_products and fixing user unit tests

This should resolve #1874 and #1948 (discovered while writing unit tests for the function).