Update on the issue with the proximity sensor, i was playing around, so turning on the loudspeaker while in a call and turning it off, resets the state of the proximity sensor, when on speaker, proximity sensor is active (for when you get your phone close to your face, screen goes off, it is intended because you should not be able to accidentally press something on the screen, when loudspeaker is on, proximity is false, aka you can work on your phone and screen doesn't turn off) for some reason, sometimes it fails to reset the state and proximity sensor remains active even if you are out of a call, i think that might be hangouts fault for not closing the call and if the app stays active in a background detecting theres a call ongoing even if theres not, that prevents proximity from switching state.
The issue also applies for 14.1 i think. That is why i have suspicions hangouts might be the reason.
Workaround is to close the call, join again and switch in between speaker and loudspeaker or plug the earbuds in and then properly exit the call, that fixes it.
Bug applies for 13.0, RR marshmallow
Not confirmed on: 14.1, RR nougat
Issue is very nagging, because when proximity sensor remains active even if you are out of a call... every attempt to interact with the phone turns the screen off.