Generating and enumerating 321-avoiding and skew-merged simple permutations