I have a cat the whole family love and spoils. He came to us on the side of our house on day and we have had him ever since. He has been neutered and well taken care of by the vet. However he has a mean streak. You can hold him in your lap upside down or any way you want and he will pur his little head off. but the moment you put him down he growl franticly and hisses at you. He is also an inside cat and every now and then we let him out but when it is time to go in it is a battle all the way to he has drawn blood from me. I can tell he loves us all more my daughter than any but I worry about my little girl because he might turn on her one day and draw blood from her and that would just tear her heart up. I worry about him he seems fine in your lap one moment and ready to kill you the next. What is up with him.
the problem with stray cats is that you do not what his life was like before you took him in. so lots of his behavior would have been formed through past experiences etc and can be difficult to break.
you did not mention how long you have had him now. usually cats will settle into their new home and behaviors but it can take quite some time, even years in some extreme cases.
the reality is that children do get scratched by cats from time to time, this is normal and cannot be prevented. What you have to do is to make sure your child knows how to approach the cat and when to back off if the cat does not want to play etc.
Why he is nice one minute and grumpy the next is impossible to say. Have you had him checked by the vet for any injuries that may hurt him when he is touched in certain places etc.
As for the going out and not wanting to come back in when you say so, is normal. You have to decide whether you want to keep him in full time (difficult considering he is used to going outside) or if you are happy for him to go out when he wants and come back when he wants. My own cat asks to go out and when she wants to come in she either cries or scratches the door to let me know that she wants in. there's no way we could make her come in if she did not want to. At the end of the day we must respect that cats are different from us and have lots of different instincts etc. they are very different from dogs who can be trained.
I have a web site which is full of information about cat behaviour etc, it may be worth taking a look.
Don't worry too much, let your bond with the cat grow naturally, follow his lead.
these pages may be of help they are about bonding with a cat and aggresion etc.
best wishes KAte