Heat transport in binary semiconductor polytypes and devices based on 2D materials : an ab initio study