Metastability for scalar conservation laws in a bounded domain