Prime End Boundaries Of Domains In Metric Spaces And The Dirichlet Problem