Wales suffered a penalty shootout defeat to Bosnia and Herzegovina in Cardiff to end their 2026 World Cup dreams.