Add membership unit and functional tests

Add members controller tests

Add functional test for leaving domain

Rest api tests

Add index/show/create with redirect tests for domains_controller

Complete coverage of members controller

Test member sorting, single member response

Unit test domain leaving