MARMOTTA-155: Add test for invalid language and use Locale.Builder

Locale.Builder throws an exception instead of returning a partial representation for illformed BCP47 language tags