Adding a timeout to Firefox cleanup process. Fixes issue 7272

Signed-off-by: Alexei Barantsev <barancev@gmail.com>