Use shareReplay from latest Rx instead of embedding it + fixes for issues #3 and #6.