I like @kaishiro and @ChrisTavers answers, but I'd like to try to directly address your question:
in China for example, what is acceptable to say without running afoul of the authorities.
In summary, in China nothing in everyday conversation will cause your arrest or imprisonment.
Background
Growing up in the US, I was taught as "common knowledge" that in communist countries, there are secret police watching and listening to your every word, and lurking in a shadow, just waiting for one wrong word, then jumping to arrest you and send you to Siberia or some other awful place. I can assure you that as of 2016 in China, this is absolutely not the case. People are generally too busy to care about your attitudes. There will be no monitoring that is more invasive then that which is performed by the US authorities.
The US State department travel advisory, if I recall correctly, used to suggests refraining from conversation about Taiwan, Tibet, or the South China Sea while in China. In my experience, even these statements are overly cautious and somewhat paranoid; perhaps that's why they are not currently listed on their website.
Of course, this only applies to casual conversation. If you are involved in organizing an anti-government uprising, trying to overthrow the government, starting a religious movement, or some other sort of large scale organizing, there is a good chance you will have some trouble. I suggest that China is not a good place for foreigners to engage in any sort political organization. Perhaps even speaking before a large audience, some discretion is advised.
So that's how to avoid "running afoul of the authorities." A second question is, what specific political topics are sensitive to ordinary Chinese people, and how to handle them? I very much like and agree with your attitude:
Now, we could live by the rule of "When you are a guest in another country you should keep your negative opinions to yourself" but that is not really ideal because they basically prevents having any philosophical conversations with anyone while living abroad.
This is awesome; it is important to develop relationships with people, and to learn and understand their opinions about important topics. It is also important to share your own understanding of the world. It's a win-win situation. In this vein, I'll speak about my experience with some of the big topics below. If you want my to know about my experiences with any additional topics, please leave me a comment.
South China Sea
This year, I can't get on an intercity train or eat lunch with a new friend without somebody asking me my opinion about the South China Sea Issue. As a person who loves to speak about politics, I find this topic very tiresome. In the past, I have tried to bring up the Iceland Exclusive Economic Zone and the US and Canada in regulating the Georges Bank. Thus far, nobody cared about these topics at all, nor saw their relevance to China's territorial claims in the South China Sea. I have also tried to speak about historical colonial motives for the US in controlling this area, but also, thus far nobody cared to speak about this either.
It turns out, that people generally are not really interested conversing about this issue in depth, nor are they interested in international law. They tend to simply repeat in one way or another their support for the PRC's stance on the issue, and sometimes view me as a representative of US foreign policy. This makes me very uncomfortable, so lately, I try to terminate conversations about the South China Sea as quickly as possible. My favorite answer is "It is so far away from the US, I can't imagine why the US government is involved in this issue. I really don't know much about it."
Tibet
The "Free Tibet" movement is another wedge issue, but very rarely is it brought up in conversation. Most Chinese people I have met are only vaguely aware that there is a free Tibet movement, and will not have many interesting attitudes about it. For most Chinese, it is an issue as small as the Texas Secession Movement.
Sometimes younger, college aged people who are have been reading English language sites on the internet will know about the Free Tibet movement. These conversations can be fun, and I think it is fine to speak in depth. However, at some point in the conversation, make absolutely clear that as a foreigner, you really don't know the fine points of the issue.
The Great Leap Forward and the Cultural Revolution
The Great Leap Forward was a horrible tragedy; and the Cultural Revolution was a very difficult time. Most families will know many who passed away during the GLF, and many people had major problems during the Cultural Revolution. The scars from these event for many people have not yet healed. Like speaking about the Holocaust with WWII survivors, these topics are not for light conversation. Do not speak about these topics in jest or with disrespect; in fact, it is wise not to bring these topics up until you have a strong relationship with somebody.
However, if you are lucky enough to have a strong relationship with somebody who lived through these events, there is much to be learned. Ask kind questions, and understand that generally people will only discuss issues that they are comfortable with. Be very sensitive to attempts to change the conversation away from these difficult topics. It someone is willing to talk, listen closely, and generally speaking, do not argue about the geo-political broad domestic implications; instead focus on what your friend is speaking about.
Mao Zedong, Deng Xiaoping, Zhou Enlai, and current leaders
Generally, conversations about these people can be very open and frank. Be aware that any opinions you may have about these people may be vastly different that what you hear. It is a good idea to accept that people who are Chinese understand these people and their impact on China better than you.
Communism
This also is a topic that is not very sensitive. Every CCP member I've met has been very kind, down to earth, and open minded.
The "Police State"
There are very few police in China; they generally do not have guns. If propaganda related to the "strong police state" that we've heard for years in the Western press is repeated, the most likely response will be bewilderment. However, people who lived during the cultural revolution might have a different opinion. I'd say don't bring this topic up. If someone else brings it up, speak more about the relationship between police and people in your home country.
Corruption
Since Xi Jinping recently started the anti-corruption drive, this is a somewhat popular topic. It is a good idea to mention the corruption in your own country. As a US citizen, I will generally point out that a multi-party democracy has tons of corruption.
Religion
In the US is isn't rare to meet people who try to convert you to their religion via argument. This is never appropriate in China. It is also not appropriate to speak about your religious beliefs before a large audience. It is not acceptable to found a new religious movement in China either. However, if you make a close friend, it is entirely acceptable to speak about your personal beliefs in private conversation. Be aware that for many parts of China, death is a taboo subject, so don't push to hard.
Conclusion
Nothing in normal conversation will cause your arrest; do not be afraid. Some topics require some level of special attention in normal conversation, primarily to allow your conversation partner to be comfortable.