Deprecate sampler module functions
Created by: wdphy16
The third PR in the #1013 series. Those module functions don't really serve a purpose today and will be deprecated.
API changes:
- The method
Sampler.samples
is added to return a generator of samples. The module functionsnk.sampler.sampler_state
,reset
,sample
,samples
, andsample_next
are deprecated in favor of the corresponding class methods. #1025
I moved the logics from the module functions to the class methods, and replaced the module functions in the tests.