A Paris court has sentenced six defendants to prison terms of six to 10 years over a 2021 boat disaster that killed 31 migrants.