Merge "Avoid memory leaks by unregistering BroadcastReceivers and cleanup upon destroy" into main