Joint distribution of multiple boundary local times and related first-passage time problems with multiple targets