Improvements and Generalizations of Stochastic Knapsack and Markovian Bandits Approximation Algorithms