Cavs re-sign guard Brodric Thomas to two-way contract