corrected sr latch and added tests for both sr and gated d latch

Please review