Fix share/discussion REST API that was returning duplicate rows in some
cases
Integration tests for marshalling of shares/discussions