change some factory methods

* moved SQL statements out of DummyMember constructor
* refactored Community constructor (created init_community() for async db)