New leasehold flats will be banned and existing leaseholders will get the right to switch to commonhold, the Government has announced.