Catch exceptions in link trail / prefix regexp creation

It seems that some user-supplied link trails are not resulting in a valid JS
regexp (apparently Italian). At least don't crash in that case.

Change-Id: I3788c93411253442ba4bc26465da28340d154840
Merge "Catch exceptions in link trail / prefix regexp creation"