Leader election and compaction for asynchronous silent programmable matter