TauID patches

Forward port of a few fixes and a performance improvement of lifetime variables calculation