Optimal Design of Supply-Adequate Microgrids in a Multi-Carrier Energy System