b-pyramid implementation: Allow the use of B-frames as references for non B and B frames

when we enable the b-pyramid the bitrates efficienctly reduced and there is not much diff in the performance
and the PSNR 00. increased some of the clips and decreased some of clips

Test results for reference when enable and disable the b-pyramid:
cli option : -b 10 --hash=1 -f 100 --b-pyramid=1 --b-adapt=2
Enable B-reference  : --b-pyramid=1
Disable B-reference : --b-pyramid=0

Results:
Enable / Disable

Clips - Johnny_1280x720_60.y4m
Total time taken - 11.19s (8.94 fps) / 13.44s (7.44 fps)
Bitrates  - 303.52 kb/s / 326.79 kb/s
PSNR      - 40.679 / 40.612

Clips - Cactus_1920x1080_50.y4m
Total Time taken - 44.61s (2.24 fps) / 48.23s (2.07 fps)
Bitrates   - 3420.80 kb/s / 3575.20 kb/s
PSNR       - 35.709 / 35.726

Clips  - BasketballDrive_1920x1080_50.y4m
Total time taken -  54.15s (1.85 fps) / 53.72s (1.86 fps)
Bitrates  - 4114.07 kb/s / 4310.45 kb/s
PSNR      - 37.283 / 37.290

Clips  - FourPeople_1280x720_60
Total time taken -  11.79s (8.48 fps) / 12.16s (8.23 fps)
Bitrates  - 514.90 kb/s / 539.08 kb/s
PSNR      - 39.782 / 39.757