dotest: make inline tests compatible with -f
dotest: make inline tests compatible with -f

Summary:
This is split off from D47265 where I needed to be able to invoke every test
with -f. That patch is kinda dead now, but this part seems like a good
cleanup anyway.

The problem with inline tests was in the way we were adding methods to
the class, which left them with an incorrect __name__ property. This
prevented dotest from finding them with -f.

I fix this with (what I think is) the correct way of dynamically
creating classes -- passing the list of methods during type construction
instead of fixing up the class afterwards. Among other things this has
the advantage of not needing to do anything special for debug info
variants. As our test method will be visible to the metaclass, it will
automagically do the multiplication for us.

Reviewers: JDevlieghere, aprantl, tberghammer

Subscribers: eraman, lldb-commits

Differential Revision: https://reviews.llvm.org/D47579

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@334009 91177308-0d34-0410-b5e6-96231b3b80d8

apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb