You should just dual (or triple, or n-tuple) license it under whichever licenses you feel comfortable releasing it under. A dual license is one where you say that the user gets to choose which license to use the program under.
The GPL is very frequently used under a dual license; most programs are licensed under "GPLv2 or later", which at this point means GPLv2 or GPLv3. There's also a lot of software which is dual licensed under the GPL and the MPL or similar license (which is actually usually a many way license, as there's usually an "or later" for all of the licenses involved).
Of course, the MPL is a weak copyleft license (like the LGPL), not strong copyleft like the GPL. So, if you dual license under the MPL, your code may be used in other proprietary programs, though modifications to your code itself must be released.
The problem with what you suggest in your question, "If you incorporate into FOSS software that uses gpl-like* license, you may re-license to that license. Otherwise, you may not change the license, Where gpl-like is any FOSS license that requires the whole project to be under the same license" is that most of the license conflicts of interest are not with such GPL like licenses (are there any other strong copyleft free software licenses other than the GPL), but instead with MPL like licenses; that is, the GPL requires the whole program to be distributed under the terms of the GPL, while the MPL requires that that portion be distributed under the MPL without additional restrictions, causing a conflict. And if you allow it to be distributed under the MPL, then people can use it in a proprietary program, as long as the MPL licensed portion remains free.
So, you have to ask yourself what you are interested in. Are you interested in your program or library only ever being used in free software? Then use the GPLv2 or later for maximum compatibility. Are you interested in your library always remaining free, but want it to be able to be linked into GPL-incompatible programs (including, potentially, proprietary programs)? Then use the LGPL, MPL, or similar license, or a dual or triple license (such as GPLv2 or later, MPL v1.1 or later, or LGPL v2.1 or later like most Mozilla source code is licensed). Do you want anyone to be able to do whatever the heck they want? Then use the X11/MIT license (shorter and simpler than BSD), or the WTFPLv2 (the shortest, most clear license I've ever seen).
And if you're feeling really generous, you can release the code into the public domain like SQLite, which comes with a blessing rather than a license in each file:
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
I always find that much more pleasant than the long, tedious, and scary legal notices involved in most licenses.