What is the max masteries one can have?

The mastery % is not linear, they apply the mastery points to a logarithmic curve. The theoretical limit is close to 100%, if you can get at least 100M mastery points. The practical limit for the points available in the game is about 2/3, i.e. 67%.