In my opinion, this is really your call, and there's no one answer here. Maybe that makes it a rocky SE question, since we work best for the format where a one good answer can bubble up to the top and be selected, but I thought there was probably enough good material here to make an answer worthwhile.
The Standard Practice is Standard for a Reason
In many industries and locations there's a standard for how soon to give notice. The standard is a standard for a reason. It really does, in most cases, NOT take longer than a few weeks to transition an employee. In my experience, giving longer notice rarely aids the company. If the company has solid guidelines for a transition, a good transition will occur within the standard notice-giving cycle. If the company has lousy practices, the transition will be painful no matter how much notice you give.
In cases where a company needs a transition time that is abnormal, they often build this into the employee sign-up agreements/contracts and it would already be something you knew about.
Losing a Good Employee is Lousy and There's No Way to Fix That
The other sad truth is that losing a good employee is simply the pits. Having the employee do a super-awesome job at training others doesn't fix that. It's the nature of the employee and how well they fit the business and the team that is the real value and that value can't be replaced.
At the same time, the how-to-do-this-job things that CAN be trained really shouldn't take 2-3 months to do. Unless you are the 99th percentile of niche workers who do such a specialized function that it would take the equivent of a college trimester to learn everything you know and everyone else in your team is starting that completely cold, it simply shouldn't take 3 months. There's exceptions to every rule - certainly with the spread of experience you mention, you have the depth of experience that others lack. But no amount of explaining and writing on your part is likely to replace you on the team.
Laws, Policies, Bonuses and Bureaucracy
This stuff is pretty specific to where you live, your industry and your company. Whether your boss knowing in advance that you are leaving will prompt an early dismissal is unfortunately a complete toss up. Yes, I've heard of cases where it's happened. I've also experienced other cases (first hand) where giving the boss an early warning was the perfect thing to do, and no harm came from it. It has everything to do with your unique situation, and I'd be wary of any answer than claimed otherwise.
Same thing, unfortunately, from bonuses. Your HR policies and any documentation around the incentive program will help clarify more than anyone on the web can. As you say in the footnote - the big difference is whether it's a past-performance award or a future-commitment incentive. There could, easily, be the case where by moving into the realm of documentation/training to support the team, you are ALSO moving out of the realm of incentivized work, such that your payout for past performance is justifiably smaller.
The big kicker is professional courtesy. If you value your direct manager and think there is an honest to goodness business risk to him not knowing you have other plans in 3 months, then maybe it IS time to gently introduce that. Honestly, I'd advocate being somewhat vague. Saying "I will be leaving in exactly 3 months" is different from saying "I'm considering a big move next year". It's skating the truth, but it's less of a hard and fast line, and in all honesty - your plans aren't all that concrete. If you still hadn't gotten a job in 3 months, would you move or would you delay the lease or sub-lease the house? If you got a job in 2 months, would you leave early?
Be careful about setting very specific deadlines with people who depend on you if you don't have totally solid plans yet. Similarly, reporting on lots of detail that isn't related to the job isn't necessarily helpful to your boss - for example, I really wouldn't want to know every time an employee of mine went on a job interview.
One big huge exception would be if you think remote work would be a possibility. Sounds like you like this job enough that if you could do it in your new location, you'd happily keep working there. If you think there's a possibility of remote work, it can't hurt to ask.
I've been in this situation. When I've judged that my leaving would cause enough damage that it could only be fixed by long term staffing choices, I've made mention to the most directly impacted manager that my staying in the company was problematic and he should have the mindset that "Bethlakshmi would never leave us!"
It was a hard compromise between the loyalty of being honest to those I deeply respect, and being careful about making claims that I wasn't certain about. I said it once, once only and then didn't ever mention it again until I had to give official notice. When I gave notice, I did it with a very firm eye on the best time I could pick to leave - I actually stretched the date so I could be there for the team for a key milestone before I left and I was clear with all job interviews that this was the only way of leaving I was comfortable with. I knew I had chosen a good new job when they applauded my decision, knowing I'd do the same for them.
Be aware that day by day status updates on a job interview process are agonizing for most - even your management. After all, you won't be certain when you are leaving until the binary condition of having reached the point in a new job negotiation that you have a job offer that you will accept. Up until then, you really don't know when that offer will come in, so there's not a lot you can tell your manager.