Further amend last fix.

* company.el:

(company-pseudo-tooltip-hide,
company-pseudo-tooltip-hide-temporarily): Set
`inhibit-modification-hooks', `inhibit-point-motion-hooks', and
disable `buffer-undo-list'.

(company-pseudo-tooltip-unhide-line): Check overlay-start against
point-max to avoid args-out-of-bounds error.

(company-pseudo-tooltip-unhide): Disable `buffer-undo-list'.
Fix tooltip positioning bug when spanning buffer text with
multi-line 'display property. Simplify fix for '[line|wrap]-prefix
issue, discards commits ca46eaa0920c9655cfaf37a76e880f436101d3b3,
24fbefc54cfa52282e5076f84cfcd1a17a02a433, and
85278de2db97d26096d18d8b28d5ddd8442afc1f.

* company.el:

(company--create-line-overlay): Removed WIDTH argument, which can
be inferred from LINE. Include newline character in overlay if
overlay spans to end-of-line, this ensures overlay will always
have length greater than zero. Removes reliance on
"(vertical-motion 0)": this call can move point to previous line
if buffer text under point has 'display property that contains
newline characters.

(company-pseudo-tooltip-show): Removed WIDTH and HEIGHT arguments,
which can be inferred from LINES and ABOVE. Add new argument
ABOVE. Save value of firstrow in overlay property 'company-row.

(company-pseudo-tooltip-show-at-point): Adjust for refactored
company-pseudo-tooltip-show .

(company-pseudo-tooltip-edit): Place point at beginning of screen
line before call to `company--create-line-overlay'.

(company-pseudo-tooltip-hide, company-pseudo-tooltip-hide-line,
company-pseudo-tooltip-hide-temporarily,
company-pseudo-tooltip-unhide,
company-pseudo-tooltip-unhide-line): Revert commits
ca46eaa0920c9655cfaf37a76e880f436101d3b3,
24fbefc54cfa52282e5076f84cfcd1a17a02a433, and
85278de2db97d26096d18d8b28d5ddd8442afc1f.

* company-tests.el(company-pseudo-tooltip-show): Updated