[Sanitizer] Introduce generic stack frame rendering machinery

Summary:
This commit introduces function __sanitizer::RenderFrame()
that allows to render the contents of AddressInfo (essentially, symbolized stack frame)
using the custom format string. This function can be used to
implement stack frame formatting for both ThreadSanitizer and
generic StackTrace::Print(), used in another places. This paves the
way towards allowing user to control the format of stack frames,
obtaining them in any format he desires, and/or enforcing the consistent
output from all sanitizers.

Test Plan: compiler-rt test suite

Reviewers: kcc

Reviewed By: kcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6140

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221409 91177308-0d34-0410-b5e6-96231b3b80d8
UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbases

When the __virtual_mask is set, __offset_flags >> __offset_shift yields
an offset into the vtable.  Dereferencing this vtable slot gets us the
vbase offset.

Adjust a test case to verify that this, in fact, works.

Differential Revision: http://reviews.llvm.org/D6074

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221445 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master', remote-tracking branch 'trunk/master'