Merged duplicate code (in calcBeliefF() and calcNewMessage()) in BP,FBP,TRWBP