webox,
1) If it is correct gramatically, what is "wanting" here - a noun, a gerund... what?
It is correct grammatically and is a gerund.
2) Is it correct in lexical sense? If so, why was it missed in the most popular dictionaries? This circumstance confuses me.
Thank you for wanting...is not an idiom.
In your sentence 'wanting' is used to mean "thanks for feeling that you would like to be my friend." The circumstance in which it is used is a special circumstance. To become someone's friend on a social website is a matter of clicking and accepting an offer of friendship. It doesn't take any more than wanting to do it. In real life a friendship is not always possible just because you want it. A real life friendship is much more complex.
3) Is it correct stylistically? ( would you use this sentence or expressed better yourself in the other way? a- in social network; b- in real conversation)
Yes, it is correct stylistically. You basically are saying "thank you for choosing to be my internet friend".
It is also possible in real conversation but the meaning would be different.
If I said, "Thank you for wanting to be my friend." in a real life conversation it would mean: The person wanted to be your friend, but in fact, it never got passed the point of wanting, it never turned into reality. Or it could express the idea of a temporary friendship.
Examples:
Thank you for wanting to be my friend, but you are really not my type.
Thank you for wanting to be my friend. I hope you want to be my friend tomorrow.
"I am wanting" is possible in conversational English, but not in formal writing.
You often come across "I am wanting" in popular songs. It expressing the idea of continuously wanting something or temporarily wanting something.
-I am wanting you.....I have been wanting you and am still wanting.
-Right now I'm wanting a cherry ice cream cone.