Ilsgateway bugs

@czue I fixed this bug: http://manage.dimagi.com/default.asp?134684#755968

Also I've changed a little bit checkpoint functionality. I've added table to ILSGateway config view to follow status of checkpoint. Could you merge this with staging?

apologies for the delay. Definitely agree with @millerdev that would be much better if everything was in the `custom.ilsgateway` module. what is making it difficult to do that? is it the tangled views?